Crypto Cost Basis Methods: FIFO, LIFO, HIFO, Specific ID and Average Cost
When you sell part of a crypto holding that you built up over time, which coins did you sell? The answer changes your taxable gain — sometimes dramatically. Cost basis methods are the rules for deciding which purchase price applies to each sale.
Why it matters: one sale, five answers
You made three Bitcoin purchases:
| Purchase | Price | Amount |
|---|---|---|
| A (oldest) | $20,000 | 0.1 BTC |
| B | $65,000 | 0.1 BTC |
| C (newest) | $40,000 | 0.1 BTC |
You now sell 0.1 BTC at $70,000, receiving $7,000.
| Method | Coins treated as sold | Cost | Gain |
|---|---|---|---|
| FIFO | A | $2,000 | $5,000 |
| LIFO | C | $4,000 | $3,000 |
| HIFO | B | $6,500 | $500 |
| Average cost | Average of all | $4,167 | $2,833 |
Same sale, same proceeds — gains from $500 to $5,000.
Run your own numbers with the free calculator: Crypto Tax Calculator
Open calculator →FIFO (first in, first out)
The oldest coins are sold first. In a rising market FIFO usually produces the largest gains, because your oldest coins were typically cheapest. The upside is that the oldest coins are the most likely to qualify for long-term rates in the US.
LIFO (last in, first out)
The newest coins are sold first. In a rising market this produces smaller gains, but the coins sold are more likely to be short-term.
HIFO (highest in, first out)
The most expensive coins are sold first, minimizing current gains or maximizing losses. It is a form of specific identification and only works where specific identification is allowed.
Specific identification
You choose exactly which units you sell. FIFO, LIFO and HIFO are all ways of applying specific identification consistently.
Which methods are allowed?
United States
The IRS allows specific identification if you can adequately identify the units sold — typically by date, cost and the wallet or account they came from. Without that, FIFO applies by default. Since 1 January 2025, basis must be tracked per wallet or account. You cannot sell coins from Exchange A and claim the high-cost coins you hold on Exchange B. Brokers reporting on Form 1099-DA generally use FIFO unless you give standing instructions for another method.
United Kingdom
There is no choice. HMRC requires the same-day rule, then the 30-day bed and breakfast rule, then the Section 104 pool, which is an average cost of all remaining tokens of that type. FIFO, LIFO and HIFO are not permitted.
Canada
The CRA requires the adjusted cost base (ACB), which is the average cost of all identical units you hold, across all wallets and exchanges. Each sale uses the current ACB per unit.
Choosing a method in the US
If you have good records, consider:
- HIFO to minimize gains this year — useful in high-income years.
- FIFO to prioritize long-term treatment for older coins.
- A mix, applied consistently and documented at the time of sale.
Remember that lowering gains now usually raises them later, because the cheaper coins remain. The benefit is deferral and, potentially, converting short-term gains to long-term ones.
Record-keeping requirements
To use specific identification, keep for each lot: acquisition date, quantity, cost including fees, wallet or account, and for each sale, which lot was sold. Crypto tax software can help, but you are responsible for accuracy. See our records checklist.
Estimate the tax on your sale
Once you know the cost basis for the coins you sold, enter it with your proceeds in the crypto tax calculator to estimate the tax under US, UK or Canadian rules.
CryptoMathly provides educational estimates only and is not financial, investment or tax advice. Crypto assets are volatile and you can lose money. Always verify figures with a qualified professional.