FIFO (First In, First Out) is an accounting method that assumes the oldest assets in your portfolio are sold first. When you sell a portion of your crypto holdings, FIFO matches that sale against your earliest purchase to determine the cost basis and calculate the gain or loss.
How FIFO works
Imagine you made three Bitcoin purchases over time:
| Purchase | Date | Quantity | Price |
|---|---|---|---|
| Buy 1 | Jan 2024 | 0.5 BTC | $30,000 |
| Buy 2 | Jun 2024 | 0.3 BTC | $45,000 |
| Buy 3 | Dec 2024 | 0.2 BTC | $40,000 |
In March 2025, you sell 0.6 BTC at $50,000.
Under FIFO, the sale is matched against the oldest purchases first:
- 0.5 BTC from Buy 1 (cost basis: $30,000 x 0.5 = $15,000)
- 0.1 BTC from Buy 2 (cost basis: $45,000 x 0.1 = $4,500)
| Component | Calculation | Amount |
|---|---|---|
| Sale proceeds | 0.6 x $50,000 | $30,000 |
| Cost basis (FIFO) | $15,000 + $4,500 | $19,500 |
| Capital gain | $10,500 |
After the sale, your remaining holdings are 0.2 BTC from Buy 2 and 0.2 BTC from Buy 3.
FIFO vs weighted average cost
The weighted average cost method calculates a single average cost per unit across all purchases.
Using the same purchases:
- Total cost: (0.5 x $30,000) + (0.3 x $45,000) + (0.2 x $40,000) = $15,000 + $13,500 + $8,000 = $36,500
- Total quantity: 1.0 BTC
- Average cost: $36,500 per BTC
Selling 0.6 BTC at $50,000:
| Component | FIFO | Weighted average |
|---|---|---|
| Sale proceeds | $30,000 | $30,000 |
| Cost basis | $19,500 | $21,900 |
| Capital gain | $10,500 | $8,100 |
In this example, FIFO produces a higher taxable gain because the oldest (cheapest) units are sold first. In a market where prices have generally risen, FIFO tends to result in higher capital gains than weighted average. Conversely, if prices have fallen, FIFO may produce lower gains or larger losses.
Other cost basis methods
| Method | Rule | Effect in rising market |
|---|---|---|
| FIFO | Sell oldest first | Higher gains |
| LIFO (Last In, First Out) | Sell newest first | Lower gains |
| HIFO (Highest In, First Out) | Sell most expensive first | Lowest gains |
| Weighted average | Use average cost | Moderate gains |
Which countries require which method
| Country | Required / accepted methods |
|---|---|
| United States | FIFO (default), specific identification allowed |
| United Kingdom | Section 104 pooled average (mandatory), with same-day and 30-day rules |
| France | Weighted average across entire portfolio (mandatory) |
| Germany | FIFO (generally accepted by tax authorities) |
| Australia | FIFO, LIFO, or specific identification |
| Canada | Adjusted cost base (weighted average) |
In the US, specific identification allows you to choose exactly which lots to sell, giving maximum flexibility for tax optimisation. However, you must be able to prove which specific units you disposed of, which requires detailed records.
Practical implications for crypto traders
Frequent traders accumulate many lots at different prices. Tracking FIFO manually becomes impractical after dozens of transactions. Automated portfolio tracking software is essential for accurate cost basis calculation.
Cross-exchange trading adds complexity. If you buy BTC on one exchange and sell on another, you still need to apply FIFO across your entire holding of that asset, not per exchange.
Forks and airdrops create new lots with a cost basis of zero (in most jurisdictions) or at fair market value on the date received. These lots enter the FIFO queue and may be the first sold in a subsequent disposal.