Skip to content

Trading Calculations

Crypto Profit & Loss Calculator: How to Calculate P&L

Profit and loss on a crypto trade is the difference between what you received when selling and what you paid when buying — after fees on both sides. Leaving out fees is the most common reason a P&L figure looks better than reality.

5 min read

All prices below are illustrative examples, not current market data.

The inputs

  • Buy price: what you paid per coin or token.
  • Sell price: what you sold for, or a price you want to test.
  • Quantity: how many units you bought and sold.
  • Fees: trading fees on the buy and sell, often a percentage of the trade value. Network or withdrawal fees can be added separately.

The formula

Cost basis = Buy price × Quantity + Buy fee
Net proceeds = Sell price × Quantity − Sell fee
Net P&L = Net proceeds − Cost basis
Return % = Net P&L ÷ Cost basis × 100

Long-term holding example

Worked example

Buying 0.5 BTC at $40,000 and selling at $46,000 with 0.1% fees

  1. Buy value = 0.5 × 40,000 = $20,000; buy fee = $20 → cost basis $20,020
  2. Sell value = 0.5 × 46,000 = $23,000; sell fee = $23 → net proceeds $22,977
  3. Net P&L = 22,977 − 20,020 = $2,957
  4. Return = 2,957 ÷ 20,020 ≈ 14.77%

Without fees the gain would look like $3,000 (15%). Fees took $43.

Short-term trade example

Worked example

1,000 tokens bought at $2.50, sold at $2.30, $3 fee each side

  1. Cost basis = 2,500 + 3 = $2,503
  2. Net proceeds = 2,300 − 3 = $2,297
  3. Net P&L = 2,297 − 2,503 = −$206
  4. Return ≈ −8.23%

On frequent small trades, fixed fees take a larger share of each result.

Things the basic formula doesn't cover

  • Buying in several lots at different prices — find the combined cost with the Crypto Average Price Calculator.
  • Taxes. Depending on where you live, gains may be taxable; rules differ by country and holding period.
  • Leveraged positions, which use different math — see the Crypto Futures P&L Calculator.

Calculator walkthrough

  1. Open the Crypto Profit & Loss Calculator.
  2. Enter your buy price, sell price and quantity.
  3. Add the fee rate or amounts your exchange charged.
  4. Press Calculate to see gross and net P&L and the return percentage.

To find the sell price needed just to cover fees, use the Crypto Break-Even Calculator.

Run your own numbers

Work out the gross and net profit or loss on a crypto trade after fees.

Open Crypto Profit & Loss Calculator

Related calculators

Frequently asked questions

Related guides

All crypto guides