Cost Basis 101March 31, 2026

FIFO vs LIFO vs HIFO: Choosing the Right Cost Basis Method for Crypto

Your cost basis method can legally swing your tax bill by thousands. Here's how FIFO, LIFO, and HIFO work — and which jurisdictions allow each.

a calculator sitting on top of a wooden table

Photo by FIN on Unsplash

Imagine you bought Bitcoin three times over the past two years — once at $30,000, once at $50,000, and once at $70,000. Today you sell one BTC at $67,000. Your taxable gain isn't just one number — it depends entirely on which coin you're treated as having sold. That choice is your cost basis method, and it's one of the most consequential decisions a crypto investor can make at tax time.

Tax authorities in most jurisdictions treat cryptocurrency as property, meaning every disposal — sale, swap, or spend — triggers a capital gain or loss calculation based on the difference between your acquisition cost (your "basis") and your sale proceeds. According to IRS Publication 551 and the property treatment framework established across most major jurisdictions, the basis of an asset is generally what you paid for it, including fees. But when you hold multiple lots of the same token acquired at different prices, the order in which you assign those lots to each sale determines whether you report a large gain, a small gain, or even a loss.

This article breaks down the three primary cost basis methods — FIFO, LIFO, and HIFO — what they mean, how they compare mathematically, and crucially, what your jurisdiction actually permits.

What Is Cost Basis — and Why Does Method Selection Matter?

Your cost basis is your original investment in an asset, adjusted for things like transaction fees. Under IRC §1001 (for US taxpayers), gain or loss on a disposal is the amount realised minus the adjusted basis. The same economic principle applies under UK capital gains rules, Australian CGT provisions, and most EU member state frameworks: you pay tax on the profit, not the gross proceeds.

When you acquire the same cryptocurrency at different prices across multiple purchases, you end up with distinct "lots" — each with its own cost basis and acquisition date. The lot you assign to a given sale determines:

  • The size of the taxable gain or loss
  • Whether the gain is short-term or long-term (which affects the tax rate in many jurisdictions)
  • Whether a gain becomes a loss, potentially offsetting other income

Choosing strategically — within the rules your jurisdiction permits — is entirely legal tax planning. The three main approaches are FIFO, LIFO, and HIFO.

FIFO: First In, First Out

Under FIFO, you're treated as selling the oldest coins you own first. If you bought 1 ETH in January, 1 ETH in June, and 1 ETH in December, and you sell 1 ETH the following year, FIFO says you sold the January coin.

Example: You bought 1 SOL at $100 (Lot A, held 14 months) and 1 SOL at $160 (Lot B, held 2 months). You sell 1 SOL at $150. Under FIFO, you're selling Lot A — a $50 long-term gain. Under FIFO's logic, you've also held Lot A long enough to qualify for preferential long-term capital gains rates in jurisdictions that offer them (such as the US, where assets held over one year are taxed at reduced rates).

FIFO is the default method in most major crypto tax jurisdictions. The IRS FAQ on Virtual Currency Transactions makes clear that if a taxpayer does not specifically identify the units being sold, FIFO applies. The Australian Tax Office similarly treats FIFO as an acceptable and common method.

In a long bull market, FIFO tends to produce larger gains — your oldest coins are typically your cheapest — but those gains may qualify for long-term preferential rates, partially offsetting the higher nominal gain.

LIFO: Last In, First Out

LIFO does the opposite — you're treated as selling your most recently acquired coins first. Using the same example above, LIFO would assign your sale to Lot B (cost $160), producing a $10 loss rather than a $50 gain.

LIFO can be attractive in falling markets, where your most recent purchases are your most expensive and create the largest losses to offset other gains. However, LIFO is legally restricted in several key jurisdictions:

  • United States: The IRS has not explicitly approved LIFO for cryptocurrency. The agency's guidance in its virtual currency FAQ describes FIFO as the default and specific identification as the permitted alternative — LIFO is not named as an approved method. Many tax professionals treat LIFO as high-risk without explicit IRS blessing.
  • United Kingdom: HMRC's cryptoassets framework doesn't use FIFO or LIFO at all — it uses a mandatory pooling system (described below), making LIFO effectively unavailable.
  • Australia: The ATO allows investors to choose a reasonable cost basis method, but requires consistency. Consult a tax professional before applying LIFO under ATO rules.

Given these restrictions, most crypto tax practitioners and tools focus primarily on FIFO and HIFO when advising clients.

HIFO: Highest In, First Out

HIFO is a variant of specific identification — you assign each sale to the lot with the highest cost basis, regardless of when it was acquired. This minimises your taxable gain (or maximises your loss) on every transaction.

Example: You hold three ETH lots: 1 ETH at $1,200, 1 ETH at $2,800, and 1 ETH at $1,800. You sell 1 ETH at $2,500. Under HIFO, you sell the $2,800 lot — realising a $300 loss. Under FIFO, you'd sell the $1,200 lot — realising a $1,300 gain. The difference in tax outcome is substantial.

In jurisdictions that permit specific identification, HIFO is simply the most tax-efficient application of that method. In the US, the IRS FAQ confirms that specific identification is permitted, provided you can document which specific units you are selling at the time of the transaction — not retroactively. This means maintaining adequate records of wallet addresses, transaction hashes, and lot assignments.

HIFO works best for active traders with many lots and high turnover. The tradeoff is record-keeping complexity and the potential to exhaust your high-basis lots, leaving you with low-basis coins that generate large gains later.

A Note on the UK: Share Pooling Rules

UK taxpayers should be aware that HMRC's Cryptoassets Manual mandates a fundamentally different approach. Rather than selecting lots in a particular order, UK rules require pooling all units of the same token into a single "Section 104 pool" with an averaged cost basis. Two additional rules override the pool for tax-loss harvesting prevention: a same-day rule (acquisitions on the day of disposal are matched first) and a 30-day "bed and breakfasting" rule (acquisitions in the 30 days following a disposal are matched before the pool). This system means that FIFO, LIFO, and HIFO, as described above, do not technically apply to UK residents — your cost basis is the pool average, subject to those ordering rules.

Side-by-Side Comparison

To illustrate the difference concretely, consider a trader who bought:

  • Lot 1: 1 BTC at $40,000 (18 months ago)
  • Lot 2: 1 BTC at $65,000 (8 months ago)
  • Lot 3: 1 BTC at $55,000 (3 months ago)

They sell 1 BTC at $67,000 today.

Method Lot Assigned Gain / (Loss) Holding Period
FIFO Lot 1 ($40,000) +$27,000 Long-term
LIFO Lot 3 ($55,000) +$12,000 Short-term
HIFO Lot 2 ($65,000) +$2,000 Short-term

Notice that HIFO produces the smallest gain, but it's short-term (in a US context, taxed at ordinary income rates). FIFO produces the largest gain but potentially at a lower long-term rate. The "best" outcome depends on your marginal tax rate, the size of the gain, and how long-term vs short-term rates apply in your jurisdiction — there's no universal answer.

Which Method Should You Use?

The right method depends on several factors:

Your Jurisdiction's Rules

This is non-negotiable. Under most interpretations of IRS guidance, US taxpayers can use FIFO or specific identification (which enables HIFO). UK taxpayers must follow HMRC's pooling rules. Australian taxpayers can generally choose but must be consistent year to year. Always confirm current rules with a qualified tax professional in your country before selecting a method.

Your Tax Situation

  • If you have large short-term gains elsewhere, HIFO may help offset them with losses or reduce new gain.
  • If most of your portfolio has long-term holding periods, FIFO might actually be optimal if long-term rates are significantly lower than short-term rates in your jurisdiction.
  • If the market is down from your average purchase price, FIFO or LIFO may both realise losses — the question is how large.

Your Record-Keeping Capability

Specific identification (and therefore HIFO) requires you to document at the time of sale which specific lots you are disposing of. According to IRS Publication 544, adequate identification of securities requires that you clearly indicate the specific lot being sold. For crypto, this means tracking wallet addresses, transaction hashes, and lot assignments — a significant operational burden if done manually.

Consistency and Changing Methods

In most jurisdictions, once you adopt a cost basis method, tax authorities expect you to apply it consistently. Switching methods year to year specifically to minimise taxes is generally not permitted and can raise audit flags. If you do need to change methods, consult a tax professional about the correct procedure — some jurisdictions require disclosure or have specific rules for transitions.

How Defitax Handles Cost Basis

Manually tracking lots across dozens of wallets, exchanges, and DeFi protocols — and then applying FIFO or HIFO across potentially thousands of transactions — is where most retail traders run into trouble. Defitax automatically imports your transaction history across chains, assigns cost basis lots, and lets you compare tax outcomes across permitted methods before you file. For US users, you can toggle between FIFO and specific identification (HIFO) to see the impact on your estimated tax liability in real time. For UK users, Defitax applies HMRC's Section 104 pooling rules automatically, including same-day and 30-day matching.

Key Takeaways

  • FIFO is the default in most jurisdictions and may be optimal if long-term capital gains rates are significantly lower than short-term rates in your country.
  • HIFO (as specific identification) is permitted in the US and several other jurisdictions and typically minimises current-year taxable gains — but requires robust record-keeping and may leave low-basis lots for future years.
  • LIFO has limited explicit regulatory support for crypto and should only be used with professional guidance confirming it is permitted in your jurisdiction.
  • UK taxpayers follow HMRC's mandatory pooling rules — traditional lot selection methods don't apply.
  • The "best" method is the one that is legally available to you and optimised for your full tax picture — not just this year's gains in isolation.
  • Whatever method you choose, document it, apply it consistently, and use tooling that can track it accurately across all your activity.

Sources

  1. https://www.irs.gov/individuals/international-taxpayers/frequently-asked-questions-on-virtual-currency-transactions
  2. https://www.irs.gov/publications/p551
  3. https://www.irs.gov/publications/p544
  4. https://www.law.cornell.edu/uscode/text/26/1001
  5. https://www.gov.uk/hmrc-internal-manuals/cryptoassets-manual
  6. https://www.ato.gov.au/individuals-and-families/investments-and-assets/crypto-asset-investments

This article is for informational purposes only and does not constitute legal, tax, or financial advice. Defitax is not a law firm, CPA, or licensed tax advisor. Always consult a qualified tax professional before making decisions based on this content.

Related Articles