Calculating crypto profit and loss (P&L) is essential for tracking portfolio performance, filing tax returns, and making informed trading decisions. The basic concept is simple, but multiple purchases at different prices, trading fees, and the distinction between realised and unrealised gains add complexity.

The basic P&L formula

Profit or Loss = (Current Price - Entry Price) x Quantity - Fees

If the result is positive, you have a gain. If negative, a loss.

Worked example: single purchase

You buy 0.5 BTC at $40,000 per coin. The current price is $52,000.

ComponentValue
Entry price$40,000
Quantity0.5 BTC
Cost basis$20,000
Current value$26,000
Unrealised profit$6,000 (30%)

If you sell at $52,000 and pay a 0.1% trading fee ($26 on $26,000), your realised profit is $5,974.

Multiple purchases at different prices

Most investors accumulate crypto over time at varying prices. You need to calculate the average cost basis.

PurchaseQuantityPriceCost
Buy 10.3 BTC$35,000$10,500
Buy 20.2 BTC$42,000$8,400
Buy 30.5 BTC$38,000$19,000
Total1.0 BTC$37,900

Average cost basis = $37,900 / 1.0 = $37,900 per BTC.

If the current price is $45,000, your unrealised profit is $45,000 - $37,900 = $7,100 (18.7%).

Realised vs unrealised gains

TypeDefinitionTax impact
Unrealised gainProfit on positions you still holdNot taxable (in most jurisdictions)
Realised gainProfit from positions you have soldTaxable in the year of sale
Unrealised lossLoss on open positionsNot deductible
Realised lossLoss from sold positionsCan offset gains

You only lock in a gain or loss when you sell, swap, or otherwise dispose of the asset. Simply holding an asset that has increased in value does not create a taxable event in most countries.

Accounting for fees

Crypto trading fees reduce your profit and increase your loss. Include all relevant costs:

  • Trading fees (maker/taker fees, typically 0.05% to 0.5%)
  • Network fees (gas fees for on-chain transactions)
  • Withdrawal fees (charged by exchanges for transferring to external wallets)
  • Spread (the difference between buy and sell prices on the exchange)

Always add purchase fees to your cost basis and subtract sale fees from your proceeds.

Percentage return calculation

Return (%) = ((Current Value - Total Cost) / Total Cost) x 100

This gives a clear picture of performance regardless of the absolute amounts invested.

Tracking P&L across multiple assets

For a portfolio with multiple cryptocurrencies, calculate P&L for each asset individually, then sum them for total portfolio P&L.

AssetCost basisCurrent valueP&LReturn
BTC$20,000$26,000+$6,000+30.0%
ETH$10,000$8,500-$1,500-15.0%
SOL$5,000$7,200+$2,200+44.0%
Total$35,000$41,700+$6,700+19.1%

Common mistakes

  • Forgetting fees. Trading fees add up, especially for frequent traders. A 0.2% fee on each buy and sell effectively reduces returns by 0.4% per round trip.
  • Ignoring crypto-to-crypto swaps. Swapping BTC for ETH is a taxable event in most jurisdictions. The swap realises a gain or loss on the BTC position.
  • Using the wrong cost method. FIFO, LIFO, and average cost produce different P&L figures. Use the method required or accepted in your tax jurisdiction.