Crypto Profit/Loss Calculator

Everything runs locally in your browser for privacy. Enter buy & sell details and any fees to see P/L and ROI instantly.

Inputs

Total units bought and sold.
For after-tax estimate. Set to 0 to ignore.
Results will appear here.

Cost basis \(C\) = \(Q \cdot P_b\) + \(f_{b,\%}\cdot Q P_b\) + \(f_{b,\mathrm{fixed}}\).
Proceeds \(S\) = \(Q \cdot P_s\) − \(f_{s,\%}\cdot Q P_s\) − \(f_{s,\mathrm{fixed}}\).
Profit \(= S - C\).   ROI \(= \frac{S - C}{C}\).   Breakeven sell price \(P_{s,BE}\) solves \(S=C\): \(P_{s,BE} = \frac{C + f_{s,\mathrm{fixed}}}{Q(1 - f_{s,\%})}\).

Notes & Assumptions

  • Supports both percentage and fixed fees on buy and sell; enter any combination.
  • Tax rate applies to profit only (simple estimate). This is not tax advice.
  • Quantities may be fractional; ROI% uses total cost basis.
  • Breakeven sell price includes fees so that profit = 0.

Understanding Crypto Profit/Loss — What’s the Same, What’s Different from Fiat

Calculating profit or loss (P/L) for a crypto trade starts with familiar finance ideas: cost basis, proceeds, fees, and ROI%. At a minimum:

Cost basis \(C = Q \cdot P_b + \text{buy fees}\).   Proceeds \(S = Q \cdot P_s - \text{sell fees}\).   Profit \(= S - C\).   ROI \(= \dfrac{S - C}{C}\).

However, crypto introduces several wrinkles that differ from traditional fiat or stock trades. The calculator lets you model these with percent and fixed fees on both sides, plus a simple after-tax estimate (optional).

Key Differences vs. Fiat & Stocks

  • Trading pairs & quote currency: In crypto you often trade against a quote asset (e.g., BTC/USDT, ETH/BTC). Your realized P/L is initially in the quote currency, not necessarily in your local fiat. Converting later introduces an extra FX-like step that can change the final fiat outcome.
  • Fee denomination: Exchanges may charge fees in the base asset, the quote asset, or a special exchange token. If fees are taken in the base asset, your quantity \(Q\) effectively decreases after buying or before selling. That changes cost basis per coin and your breakeven. Our inputs support both % and fixed fees to reflect this.
  • On-chain costs vs. broker fees: In crypto you might pay network fees (gas) for deposits/withdrawals on top of exchange trading fees. Network fees are variable and can be material; they effectively add to cost basis or reduce proceeds.
  • 24/7 markets, no closing price: Crypto trades continuously. There’s no official “close,” so realized P/L depends only on your execution prices and fees, not a daily settlement.
  • Precision and “dust”: Crypto supports many decimal places. Tiny residual balances (dust) and rounding can leave small P/L differences that wouldn’t appear with typical two-decimal fiat amounts.
  • Multi-leg routes: You might go ALT → BTC → USD or ALT → USDT → USD. Each leg has its own price, spread, and fees. The final P/L equals the compounded effect of all legs, not just the headline buy and sell.
  • Custody & settlement: Exchange balances update instantly, but on-chain transfers settle separately and may incur additional costs or delays.

Breakeven with Fees (Why It’s Higher Than You Expect)

Because sell fees reduce proceeds, the breakeven sell price needs to be above the simple average cost. Solving \(S=C\) with sell fee percent \(f_s\) and fixed fee \(k_s\):

\( P_{s,\mathrm{BE}} = \dfrac{C + k_s}{Q(1 - f_s)} \).

If your platform discounts fees when paying with a specific token, treat that as a lower \(f_s\) or \(k_s\) in the calculator, and remember that paying fees in a different asset can alter that asset’s P/L too.

After-Tax Notes (High-Level)

The calculator includes an optional single tax rate applied to positive profit for an after-tax estimate. Real tax treatment can depend on your jurisdiction, holding period, accounting method (FIFO/LIFO/average), and whether costs like network fees are capitalized into basis. Treat the output as an educational approximation, not tax advice.

Good Hygiene for Accurate P/L

  • Record fee currency for each trade and whether it reduced quantity or fiat proceeds.
  • Track multi-leg conversions end-to-end; P/L compounds across legs and fees.
  • Include transfer fees (deposits/withdrawals) in cost basis or proceeds where appropriate.
  • Export fills from your exchange periodically; tiny rounding differences add up.

This is a static, privacy-first calculator: no price feeds, no storage of your inputs. For portfolio-level analysis, repeat the calculation per lot or export your fills and aggregate offline.

Explore more tools