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:

PurchaseDateQuantityPrice
Buy 1Jan 20240.5 BTC$30,000
Buy 2Jun 20240.3 BTC$45,000
Buy 3Dec 20240.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)
ComponentCalculationAmount
Sale proceeds0.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:

ComponentFIFOWeighted 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

MethodRuleEffect in rising market
FIFOSell oldest firstHigher gains
LIFO (Last In, First Out)Sell newest firstLower gains
HIFO (Highest In, First Out)Sell most expensive firstLowest gains
Weighted averageUse average costModerate gains

Which countries require which method

CountryRequired / accepted methods
United StatesFIFO (default), specific identification allowed
United KingdomSection 104 pooled average (mandatory), with same-day and 30-day rules
FranceWeighted average across entire portfolio (mandatory)
GermanyFIFO (generally accepted by tax authorities)
AustraliaFIFO, LIFO, or specific identification
CanadaAdjusted 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.