Reference

Cost basis: which lot you sold matters.

When you've made multiple buys at different prices, the lot you "sell" at exit is a methodology choice, not a fact. The choice changes your reported profit by thousands of dollars.

The four methods

If you bought BTC at $20k, $40k, and $60k across three separate transactions, then sold one BTC at $90k, what was your gain? It depends entirely on which buy you're matching against the sale:

  • FIFO (First In, First Out). Match the sale against the oldest buy. Sale of 1 BTC at $90k against the $20k buy = $70k gain. The default in most jurisdictions, often required for retail accounts.
  • LIFO (Last In, First Out). Match against the newest buy. $90k − $60k = $30k gain. Permitted in some US contexts but not all.
  • HIFO (Highest In, First Out). Match against the highest-priced buy still in inventory. $90k − $60k = $30k gain. Minimises gains during a rising market.
  • Specific identification. Choose which specific lot to sell at the time of sale, with documentation. The most flexible but also the most documentation-intensive.

What's allowed where

JurisdictionDefaultOther optionsNotes
USFIFOSpecific ID, HIFOSpecific ID requires per-lot records and consistent application
UKSection 104 pool (avg)30-day rule + same-day ruleNot lot-based; cost basis is the running average across the “pool”
CanadaAdjusted Cost Base (ACB)Identical-property ruleRunning average; no specific ID
GermanyFIFONone1-year holding qualifies for tax-free disposal
FranceWeighted averageNone30% flat tax (PFU) on realised gains
AustraliaFIFO or specific IDHIFO permitted50% CGT discount for holdings > 12 months
SingaporeN/AN/ANo capital gains tax for individuals

Worked example: HIFO vs FIFO during a bull cycle

Buy history: 1 BTC at $20k (year 1), 1 BTC at $40k (year 2), 1 BTC at $60k (year 3). Sell 1 BTC at $90k in year 3.

  • FIFO: $90k − $20k = $70k gain. Long-term (3 years), US LT rate ~15 %, tax = $10,500.
  • HIFO: $90k − $60k = $30k gain. Short-term (held < 1 year on the $60k lot), US ST rate ~24 %, tax = $7,200.

HIFO produces the lower tax bill in this case but at the cost of disposing of the more recent lots first — which leaves the older, lower-cost lots in inventory for future sales (where the gain would be larger). The net cumulative tax over the full cycle is approximately equal across methods; the difference is timing.

The rebalancing argument for HIFO. Realising gains at HIFO during the bull market lets you reset cost basis higher on the lots you keep. If you re-buy after a drawdown, your re-acquired lots have low cost basis, but the gain you avoid paying tax on now is gain you'll pay tax on later. HIFO is a timing trade, not a permanent reduction.

Implementation reality

Specific identification on a busy DeFi-trading wallet is essentially impossible to do manually. Most retail traders end up using FIFO by default because that's what their tax software supports without complex configuration. CoinTracker, Koinly, and TaxBit all support FIFO, HIFO, and (with manual lot tagging) specific ID.

The calculator on this site does not implement cost-basis matching; it computes a single trade in isolation. For multi-lot tax reporting you need full transaction history and dedicated software.