If you bought the same coin more than once at different prices, every sale raises a question: which coins did you sell? The answer decides your taxable gain. Sell bitcoin bought at $30,000 and the gain is large; sell bitcoin bought at $90,000 and it may be a loss โ even though, on the blockchain, a satoshi is a satoshi. Tax systems answer the question with cost-basis methods: FIFO, LIFO, HIFO, average cost and specific identification. This guide explains each with worked examples, shows where they apply and lists the records you need. It is general information, not tax advice โ the method you may use depends on your country.
What a tax lot is
A lot is a batch of coins acquired in one transaction, with its own date, quantity and cost (price plus fees). Buying 0.1 BTC on 10 January and 0.1 BTC on 20 March creates two lots. When you sell, you dispose of coins from one or more lots. The gain on each piece is proceeds minus that lotโs cost.
A swap of one crypto for another โ BTC to USDT, ETH to SOL โ is a disposal in many countries, exactly like a sale for cash. So are payments made in crypto.
The methods
FIFO โ first in, first out. You are treated as selling your oldest coins first. In a rising market, the oldest coins are usually the cheapest, so FIFO tends to produce larger gains โ but older lots may qualify for long-term rates or holding-period exemptions.
LIFO โ last in, first out. You sell the newest coins first. In a rising market this often means a higher cost and smaller gains now, with the cheap old coins left for later.
HIFO โ highest in, first out. You sell the most expensive lots first, minimising the current gain (or maximising the loss). HIFO is a form of specific identification and is only allowed where you can identify lots.
Average cost. All coins share one average cost. Some jurisdictions require pooling with an average; others do not allow it for crypto.
Specific identification. You choose which lots you sell, provided you can identify them with adequate records. FIFO, LIFO and HIFO are just systematic ways of choosing.
A worked example
You made three purchases of BTC and one sale:
| Date | Action | Quantity | Price | Cost |
|---|---|---|---|---|
| 10 Jan 2025 | Buy | 0.05 BTC | $42,000 | $2,100 |
| 2 Mar 2025 | Buy | 0.03 BTC | $61,000 | $1,830 |
| 15 Jun 2025 | Buy | 0.02 BTC | $66,000 | $1,320 |
| 20 Nov 2025 | Sell | 0.04 BTC | $90,000 | proceeds $3,600 |
(Fees are left out for clarity; in practice they are added to cost or deducted from proceeds.)
FIFO sells 0.04 BTC from the January lot: cost 0.04 ร $42,000 = $1,680. Gain = $3,600 โ $1,680 = $1,920.
LIFO sells the newest coins first: 0.02 BTC from June ($1,320) and 0.02 BTC from March (0.02 ร $61,000 = $1,220). Cost $2,540. Gain = $1,060.
HIFO sells the most expensive first โ here the same lots as LIFO, because the June and March prices are the highest. Gain = $1,060.
Average cost: total cost $5,250 for 0.10 BTC = $52,500 per BTC. Cost of 0.04 BTC = $2,100. Gain = $1,500.
Same trade, gains from $1,060 to $1,920. Our crypto tax lot calculator runs all three lot methods side by side on your own history, shows the holding period of each matched lot and exports to Excel or CSV. Its free template is exactly this table โ fill it in as you trade.
Which method applies where (in broad strokes)
Always check your own tax authorityโs current guidance; rules and interpretations change.
Holding periods: why the method matters twice
In countries that tax short-term and long-term gains differently, or exempt long holdings, the method changes not only the size of the gain but also its type. Under FIFO you sell the oldest coins first, which are more likely to be long-term. LIFO and HIFO may produce smaller gains that are short-term. The calculator shows the days held for every matched piece so you can see the trade-off.
Losses are useful too
Selling a lot below its cost realises a loss that can often offset gains. HIFO surfaces losses automatically in falling markets. Some countries restrict loss harvesting โ the UKโs 30-day rule exists partly for that reason, and other countries have wash-sale-style rules for securities that may or may not apply to crypto. Do not assume; check.
Records you need
A spreadsheet is enough for most people. The free crypto portfolio tracker includes a transactions sheet, and the average price calculator helps when you need the pooled cost. Export exchange histories every year: platforms close, change formats or lose old data.
Swaps count as disposals
People often forget that BTC โ ETH or ETH โ USDT is a disposal of the first coin. If you use instant swaps, keep the order ID, both transaction hashes and the value at the time. One trick that simplifies records: note the value of the coin you received โ it is usually both the proceeds of the disposal and the cost of the new lot.
Common mistakes
A quick way to check your numbers
What about coins you received, not bought?
Airdrops, staking rewards, mining payouts and payments for work all create lots too. In many countries their cost basis is the market value at the moment you received them, because that value was already taxed as income. If you record them at zero instead, you will overstate your gains when you sell. Add each receipt to your log with its value on the day, and treat it like any other lot when matching sales.
Summary
Tax lots decide which purchase price is matched to each sale. FIFO, LIFO, HIFO and average cost can give very different gains for the same trades, and some countries prescribe one method while others allow a choice with good records. Keep a complete log of acquisitions, disposals and swaps, run the numbers before you file, and ask a tax professional when the stakes are high.