Trading

    How to Calculate Bitcoin Profit & Loss (Formula + Free Tool)

    By Web3Believer & Webio
    Updated · Originally published 9 min read

    The Basic Bitcoin P&L Formula

    Use total amounts, not just prices per coin.

    Realized P&L = (BTC sold × sale price per BTC − selling costs) − basis of BTC sold.

    Advertisement

    Unrealized P&L = BTC held × reference price − remaining basis.

    Example: 0.5 BTC bought at $80,000 per BTC costs $40,000 before fees. At a $100,000 reference price, it is worth $50,000: a $10,000 paper gain. These are example prices. Do not subtract an acquisition fee again if basis already includes it. A partial sale uses only the sold units’ basis.

    Understanding Cost Basis

    Cost basis records the amount paid for a purchase. If 0.1 BTC costs $5,000 plus a $25 acquisition fee paid separately, basis is $5,025. If $5,000 is an all-in budget and the fee is deducted from it, you receive less BTC; do not add the fee again.

    FIFO, LIFO and HIFO change which lot’s cost is assigned to a sale, not total portfolio cost. These are mathematical comparisons, not freely available tax choices everywhere. Under US rules, adequate identification matters; otherwise FIFO generally applies within the wallet or account. LIFO/HIFO need valid timely specific identification where permitted.

    Realized vs Unrealized Gains

    A rise while you hold BTC is an unrealized gain. Under US investment rules, selling, exchanging or spending realizes a gain or loss, even without withdrawing cash to a bank. Simply buying or holding does not itself realize a gain.

    Receiving BTC for work or mining may create income before a sale. IRS guidance is US guidance, not a rule for every country. After a partial sale, retain separate records for sold units and the remaining balance.

    Tools for Tracking Bitcoin P&L

    For a few buys, a spreadsheet can work: keep date/time, BTC received, cash paid, currency, acquisition fee, wallet/account and transaction ID. Link each sale to the relevant purchase lots.

    The P&L calculator models fees, ROI and break-even price; it is not a tax return or full tax-lot reconciliation service. Import tools can help with many accounts, but check matches. Missing transfers can look like sales or zero-basis deposits. Reconcile ending balances against actual wallets and exchange statements.

    Common P&L Calculation Mistakes

    • Double-counting fees: include acquisition costs once; subtract sale charges once.
    • Adding every transfer fee to tax basis: record separately; treatment depends on the transaction and law. BTC paid for a service can itself be a disposal.
    • Using average portfolio cost for every tax sale: valid lot selection can differ from a performance average.
    • Skipping small buys: each DCA purchase needs a record.
    • Treating ROI as take-home cash: fees and tax can reduce it.

    Read the tax guide before relying on loss harvesting. A lower gain shown by a method does not prove it is allowed or best.

    Advertisement

    FIFO, LIFO and HIFO: A 0.20 BTC Sale

    Three purchases in one wallet, excluding fees. These are example prices.

    Purchase BTC Price per BTC Cost
    First 0.10 $60,000 $6,000
    Second 0.10 $90,000 $9,000
    Third 0.10 $80,000 $8,000

    Sell 0.20 BTC at $110,000 per BTC: $22,000 proceeds before charges.

    Selection Lots sold Basis sold Gain before tax Basis left
    FIFO: oldest first First + second $15,000 $7,000 $8,000
    LIFO: newest first Third + second $17,000 $5,000 $6,000
    HIFO: highest cost first Second + third $17,000 $5,000 $6,000

    Total original basis is always $23,000. A smaller gain now leaves less basis later. LIFO and HIFO match here, but not always. Holding periods can also change tax. Notice 2026-20 extends temporary identification relief through December 31, 2026 for covered US broker transactions; timely records or standing instructions are still required. It does not allow choosing favorable lots after selling.

    ROI vs Annualized Return

    ROI = profit ÷ cost × 100.

    CAGR = ((ending value ÷ starting value)^(1 ÷ years) − 1) × 100.

    Value change Time Total ROI Annualized return
    $1,000 → $2,000 1 year 100% 100%
    $1,000 → $2,000 5 years 100% About 14.87%

    Doubling has the same total ROI but very different yearly meaning. Neither measure shows the drops along the way. This CAGR formula assumes no extra deposits or withdrawals. For recurring buys, use a method that accounts for cash-flow timing; do not divide total ROI by years.

    A Fee Worksheet You Can Check by Hand

    The acquisition fee is paid on top; all 0.10 BTC is later sold.

    Item Amount Calculation
    Purchase $5,000 0.10 × $50,000
    Acquisition fee $25 Paid separately
    Total basis $5,025 $5,000 + $25
    Gross sale $7,000 0.10 × $70,000
    Sale fee $35 0.5% × $7,000
    Net proceeds $6,965 $7,000 − $35
    Profit before tax $1,940 $6,965 − $5,025
    ROI after these fees About 38.61% $1,940 ÷ $5,025 × 100

    Save confirmations showing whether fees were cash or BTC. Keep self-transfers separate. For partial sales, assign only the selected lot’s proportional basis. Preserve original exports alongside your worksheet so every total can be checked.

    Sponsored

    BybitUp to $30,000

    Pro trading platform with deep liquidity and a tiered deposit reward pool for new users.

    Claim your deposit bonus

    Frequently Asked Questions

    Advertisement

    We use cookies to measure usage and serve relevant ads. Privacy