Crypto glossary

FIFO and other cost-basis methods

Definition

FIFO, first in first out, treats the oldest crypto bought as the first sold when calculating gains; other methods include specific identification.

Someone who bought bitcoin at several prices and sells only part of it must decide which purchases were sold, because each has a different cost basis. Under FIFO, the earliest lots go first. Under LIFO, the most recent go first. Under highest in, first out (HIFO), the most expensive lots go first, which usually minimises the taxable gain. Specific identification lets the taxpayer pick exact lots, provided records support the choice. Average cost methods pool all units at one average price.

Which methods are allowed depends on the country. In the US, crypto taxpayers can use specific identification, which makes HIFO and LIFO possible, or default to FIFO, and since 2025 lots must be identified per wallet or exchange account. In Spain, the tax agency applies FIFO to homogeneous assets, including cryptocurrencies, so taxpayers cannot choose. Other countries, such as the UK, use pooling rules.

The method can change the tax due in a given year substantially, but not the total gain over the life of the holding. Switching methods without a legal basis can lead to penalties.

Example

A trader bought 1 BTC at 20,000 dollars and another at 60,000, then sold one at 70,000. Under FIFO the gain is 50,000 dollars; using specific identification of the second lot in the US, it is 10,000.

Related terms