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
| Jurisdiction | Default | Other options | Notes |
|---|---|---|---|
| US | FIFO | Specific ID, HIFO | Specific ID requires per-lot records and consistent application |
| UK | Section 104 pool (avg) | 30-day rule + same-day rule | Not lot-based; cost basis is the running average across the “pool” |
| Canada | Adjusted Cost Base (ACB) | Identical-property rule | Running average; no specific ID |
| Germany | FIFO | None | 1-year holding qualifies for tax-free disposal |
| France | Weighted average | None | 30% flat tax (PFU) on realised gains |
| Australia | FIFO or specific ID | HIFO permitted | 50% CGT discount for holdings > 12 months |
| Singapore | N/A | N/A | No 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.
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.