Compute crypto cost basis using FIFO (default), LIFO, or HIFO across multiple lots. HIFO usually minimizes capital gains; FIFO is required by some exchanges. New IRS 1099-DA in 2026.
Detailed instructions, formula notes, and US-context guidance shown in the calculator above.
Disclaimer: Estimate only. Consult a qualified professional for decisions with major financial, legal, or health consequences.
Loading calculatorโฆ
Calculator information
๐ How to use this calculator
- Enter your purchase lots: date, quantity, and cost basis per coin.
- Enter the sale transaction: date, quantity sold, and sale price.
- Select accounting method: FIFO (default for most exchanges), LIFO, HIFO, or Specific ID.
- Review cost basis used, capital gain/loss, and tax owed at short-term vs long-term rates.
- Note: 2026 brings IRS Form 1099-DA โ exchanges report cost basis directly to IRS.
๐งฎ Crypto Capital Gain (FIFO/LIFO/HIFO/SpecID)
Gain = Sale_proceeds - Selected_lots_cost_basis
- FIFO: oldest lots sold first (default for most exchanges including Coinbase, Kraken)
- LIFO: newest lots sold first (often higher basis = lower gain in rising market)
- HIFO: highest-basis lots sold first (minimizes gain โ most tax-efficient)
- Specific ID: pick exact lots (requires detailed records pre-sale)
- Short-term (โค1 year held): ordinary income rates (10-37%)
- Long-term (>1 year held): 0/15/20% LTCG rates
Starting 2025-2026 broker reporting: exchanges must issue Form 1099-DA showing gross proceeds AND cost basis. For lots acquired before broker reporting (pre-2025), basis is your record-keeping. Wallet-by-wallet basis tracking required as of 2025 (each wallet treated as separate account).
๐ก Worked example: Three BTC lots, sell 1 BTC at $95K
Given:- Lot 1: Jan 2022, 1 BTC @ $40,000
- Lot 2: Sep 2024, 1 BTC @ $58,000
- Lot 3: Mar 2025, 1 BTC @ $75,000
- Sale: Nov 2026, 1 BTC @ $95,000
- Holding period of each lot to sale: 4yr, 2yr, 1.7yr (all long-term)
Steps:- FIFO: sell Lot 1 ($40K basis) โ gain = $95K - $40K = $55,000 LT
- LIFO: sell Lot 3 ($75K basis) โ gain = $95K - $75K = $20,000 LT
- HIFO: sell Lot 3 ($75K basis, highest of LT-eligible) โ $20,000 LT
- Tax at 15% LTCG: FIFO $8,250 vs HIFO $3,000 โ HIFO saves $5,250
- Remaining basis carries forward to next sale
Result: HIFO method saves $5,250 in this transaction vs FIFO. Cumulative savings on a portfolio with regular trading: tens of thousands. Note that low-basis lots remain, deferring (not eliminating) the gain.
โ Frequently asked questions
Can I just choose HIFO if my exchange defaults to FIFO?
Yes, but you must (1) make an explicit election using Specific Identification, (2) document the specific lots you're identifying at or before sale time, and (3) ensure your tax records reflect this choice. Treasury Reg 1.1012-1(c) governs. Once elected for a particular sale, you cannot retroactively change. Tools like Koinly, CoinTracker, ZenLedger automate HIFO selection across exchanges and produce IRS-compliant reports.
What changes with the 2026 Form 1099-DA?
Crypto brokers (Coinbase, Kraken, Gemini, etc.) must now issue 1099-DA reporting gross proceeds (2025 onward) and cost basis (2026 onward). Three impacts: (1) IRS gets your data directly โ under-reporting much riskier; (2) Exchange uses its default method (usually FIFO) for basis โ if you used HIFO on your own records, expect mismatch letters from IRS; (3) DeFi and self-custody (non-custodial wallets) NOT covered by 1099-DA โ still your responsibility.
Do wallet-to-wallet transfers create a taxable event?
No โ moving crypto between your own wallets (Coinbase โ MetaMask โ hardware wallet) is NOT taxable. Cost basis carries with the coin. HOWEVER: under the new wallet-by-wallet rules (2025+), each wallet is treated as a separate account for basis tracking. You can't blend across wallets. Track transfers carefully to maintain accurate lot-level records.
What about staking, airdrops, or mining income?
Staking rewards: taxable as ORDINARY income when received (not when sold). FMV at receipt becomes your basis. Airdrops: ordinary income at FMV when you have dominion and control (typically claim date). Mining: ordinary income when received + self-employment tax if it's a trade/business. Subsequent sale: capital gain/loss on the difference between sale price and that initial FMV. The 2025 wallet-by-wallet rule applies to staking too.
Can I tax-loss harvest crypto like stocks?
YES โ and unlike stocks, the wash sale rule does NOT currently apply to crypto. You can sell BTC at a loss and re-buy it 5 minutes later, claiming the loss. This is a feature, not a bug, of crypto's tax treatment as 'property' rather than 'security'. Congress has proposed extending wash sale to crypto multiple times (2021-2024); none have passed. Stay alert for legislative changes.
๐ Sources & references
Last updated: May 23, 2026