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
- Buy value = 0.5 × 40,000 = $20,000; buy fee = $20 → cost basis $20,020
- Sell value = 0.5 × 46,000 = $23,000; sell fee = $23 → net proceeds $22,977
- Net P&L = 22,977 − 20,020 = $2,957
- 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
- Cost basis = 2,500 + 3 = $2,503
- Net proceeds = 2,300 − 3 = $2,297
- Net P&L = 2,297 − 2,503 = −$206
- 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
- Open the Crypto Profit & Loss Calculator.
- Enter your buy price, sell price and quantity.
- Add the fee rate or amounts your exchange charged.
- 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.
Related calculators
Frequently asked questions
Related guides
Crypto DCA: What Dollar-Cost Averaging Means
What dollar-cost averaging means for crypto, how recurring purchases set your average entry price, a worked example, the advantages and limitations, and how fees affect DCA.
Crypto Position Size: How to Calculate Trade Size
How to calculate crypto position size from account size, entry price, stop-loss and the amount you choose to risk, with a formula, worked example and free calculator.
Crypto Leverage Explained: Margin, Position Size & Risk
How crypto leverage works: margin, position value, how leverage amplifies gains and losses, the liquidation concept, fees and funding, and why exchange rules differ.