Crypto Taxes

FIFO vs LIFO vs HIFO: Choosing a Crypto Cost Basis Method

By HealthShaper Hub · · How we check facts

FIFO, LIFO and HIFO turn one identical crypto sale into three different taxable gains. Here is how each cost basis method works and which is the IRS default.

Bar chart comparing the taxable gain from FIFO, LIFO and HIFO cost basis methods on the same crypto sale

Key takeaways

  • FIFO, LIFO and HIFO applied to the same sale produced gains of $1,400, $1,100 and $850 in our example.
  • FIFO is the IRS default when you don't specifically identify units; LIFO isn't an IRS-named method at all.
  • HIFO is really specific identification, applied consistently to pick the highest-cost lot first.
  • A lower gain today from HIFO means a lower cost basis left in your remaining coins, and a larger gain later.
  • As of 2025, basis must generally be tracked per wallet or account, not pooled across your whole portfolio.
On this page
  1. Why the same sale can report three different gains
  2. FIFO: the IRS default
  3. LIFO: the mirror image, with a catch
  4. HIFO: specific identification aimed at the highest-cost lot
  5. Worked example: one sale, three cost bases
  6. The trade-off HIFO doesn’t advertise
  7. Two catches that apply to specific identification
  8. Not every country offers this choice
  9. Common mistakes with cost basis methods
  10. The bottom line
  11. Frequently asked questions
  12. Sources

Why the same sale can report three different gains

Once you’ve bought the same coin more than once, at different prices, selling only part of your position raises a question no price chart answers: which units did you actually sell? The rule you use to answer that decides your cost basis, and your cost basis decides your taxable gain. Our crypto taxes pillar guide covers how disposals and cost basis fit into the bigger tax picture; this article stays narrowly on the three methods investors compare most.

  • FIFO (“first in, first out”): the oldest units you hold are treated as the ones sold.
  • LIFO (“last in, first out”): the most recently bought units are treated as sold first.
  • HIFO (“highest in, first out”): the most expensive units, regardless of purchase date, are treated as sold first.

All three are answers to the same question, applied to the same purchase history. None of them changes how much you actually received for the sale.

FIFO: the IRS default

FIFO is the method the IRS applies automatically when you haven’t specifically identified which units you sold. According to IRS guidance on virtual currency transactions, units are treated as disposed of “in chronological order beginning with the earliest unit” you acquired, on a first-in, first-out basis, unless you can document a specific identification instead.

FIFO tends to produce the largest reported gain in a market that has mostly risen over time, because it draws first from your cheapest, oldest lots. It’s also the simplest method to apply without extra recordkeeping, which is part of why it’s the fallback.

LIFO: the mirror image, with a catch

LIFO flips the order: the newest purchase is drawn from first. In US tax guidance, LIFO isn’t a separately named, IRS-sanctioned method the way FIFO is. Where it shows up in practice, it’s really a form of specific identification, choosing to sell the most recently acquired lot, subject to the same documentation requirement as any other specific identification.

LIFO can lower a reported gain compared with FIFO when prices have risen since your oldest purchase, because it leaves the cheapest, oldest lot unsold. But it doesn’t target the highest-cost lot specifically, so it usually doesn’t minimize the current gain as much as HIFO does.

HIFO: specific identification aimed at the highest-cost lot

HIFO sells the most expensive unit first, whenever it was bought. The IRS doesn’t use the word “HIFO” in its own guidance; what it actually permits is specific identification, choosing which units you disposed of if you can document, at or before the sale, the date and time each unit was acquired, its basis and fair market value at acquisition, and the same details at disposal. HIFO is that rule applied with one consistent goal: pick the lot with the highest basis every time.

Because it targets cost rather than date, HIFO tends to produce the smallest reported gain of the three methods in a position built from purchases at varying prices. That’s exactly why investors ask about it, but it comes with a trade-off explained below.

Worked example: one sale, three cost bases

Suppose you bought ETH in three lots: 1.0 ETH at a hypothetical $1,600 in March, 1.0 ETH at $2,400 in June, and 1.0 ETH at $1,900 in August. In November, you sell 1.5 ETH at $2,800, for proceeds of 1.5 × $2,800 = $4,200.

MethodUnits soldCost basisTaxable gain
FIFO1.0 ETH @ $1,600 + 0.5 ETH @ $2,400$1,600 + $1,200 = $2,800$4,200 − $2,800 = $1,400
LIFO1.0 ETH @ $1,900 + 0.5 ETH @ $2,400$1,900 + $1,200 = $3,100$4,200 − $3,100 = $1,100
HIFO1.0 ETH @ $2,400 + 0.5 ETH @ $1,900$2,400 + $950 = $3,350$4,200 − $3,350 = $850
Same 1.5 ETH sale, three cost basis methods
  • FIFO$1,400
  • LIFO$1,100
  • HIFO$850
Same trade, same prices: the taxable gain ranges from $1,400 to $850 depending on which lot you're treated as selling.

Same purchases, same sale price, a $550 gap between the highest and lowest reported gain. Nothing about the trade changed; only the bookkeeping rule did.

The trade-off HIFO doesn’t advertise

HIFO’s lower gain today isn’t free. It comes from leaving the cheapest-per-unit lots in your remaining holdings, which lowers the average cost basis of what you keep. In the example above, after the sale you’re left holding 1.5 ETH. Under FIFO, that remaining position carries a basis of $3,100 (the rest of the June lot plus all of August). Under HIFO, it carries only $2,550 (the March lot plus half of August). A lower basis today means a larger taxable gain whenever you eventually sell those remaining coins, all else equal.

Example: If you sold the entire 1.5 ETH left over at $3,000 apiece some time later, the FIFO-based remainder would show a gain of 1.5 × $3,000 − $3,100 = $1,400, while the HIFO-based remainder would show 1.5 × $3,000 − $2,550 = $1,950. HIFO didn’t erase $550 of gain; it moved it into a later tax year.

That’s a real planning lever, not a loophole, and it’s worth using deliberately rather than by default. Our tax-loss harvesting guide covers the opposite situation, when you want to realize a loss on purpose. Our average cost basis guide walks through a fourth reference point, a pooled average of your purchase history, alongside these three lot-based methods.

Two catches that apply to specific identification

Choosing HIFO or LIFO in practice means relying on specific identification, and two limits apply in most systems that allow it. First, the identification generally has to happen at or before the time of the sale, using records you kept as you went, not a choice made later while filing to produce the smallest number. Second, mixing methods inconsistently across accounts, or across tools that assume different defaults, is one of the fastest ways for your records to stop matching what you report.

There’s also a newer wrinkle specific to the US. Under recent IRS guidance, cost basis must generally be tracked on an account-by-account or wallet-by-wallet basis for acquisitions and dispositions from 2025 onward, rather than pooled across every wallet and exchange you hold coins on. A related safe harbor lets taxpayers allocate previously unattached basis to specific wallets using a reasonable method, but the underlying shift matters for anyone choosing a method: FIFO, LIFO or HIFO now applies within each wallet or account separately, not to your holdings as one combined pile.

Not every country offers this choice

FIFO, LIFO and HIFO are specifically US concepts, and even there, only FIFO and specific identification (which HIFO and LIFO fall under) are actually named in IRS guidance. Other tax systems don’t offer lot-by-lot selection at all. HMRC’s Section 104 pooling rule, for example, requires UK investors to track same-type tokens in a single pool with one averaged cost that rises and falls with each transaction, rather than picking which lot a sale draws from. Our pillar guide to how crypto taxes work walks through that averaging approach and contrasts it directly with FIFO on the same hypothetical trade.

The practical takeaway: don’t assume a method you’ve read about in a US-focused article applies where you file. Confirm which cost basis rules your own tax authority permits before choosing one.

Common mistakes with cost basis methods

  1. Assuming HIFO is always best. It minimizes today’s gain, not your lifetime tax bill; the basis it leaves behind is lower, not gone.
  2. Picking a method after the fact. Specific identification generally has to be made at or before the sale, not chosen at filing time to fit the smallest number.
  3. Mixing methods across wallets inconsistently. Since 2025, US basis tracking is generally per wallet or account, and inconsistent methods across them are hard to reconcile later.
  4. Forgetting that LIFO isn’t a named IRS method. It’s specific identification aimed at the newest lot, with the same documentation requirement as any other specific identification.
  5. Assuming your method applies abroad. A method allowed in one country, like specific identification in the US, may not exist at all in another, like the UK’s pooled approach.

To see how a pooled average basis compares with FIFO, LIFO or HIFO on your own purchase history, our average cost calculator totals multiple buys into one figure you can set alongside the lot-by-lot methods above.

The bottom line

FIFO, LIFO and HIFO answer the same question, which units did you sell, in three different ways, and on a position built from purchases at different prices, that choice alone can shift your reported gain by a meaningful amount. FIFO is the IRS’s default; HIFO and LIFO are both forms of specific identification that require records made at the time, not after the fact. Whichever you use, remember that a lower gain now usually means a lower basis, and a larger gain, later. Rules vary by country; check with a qualified professional about which methods you’re permitted to use.

Frequently asked questions

What is the difference between FIFO, LIFO and HIFO in crypto?

FIFO treats the oldest coins you bought as the ones you sold first. LIFO treats the newest coins as sold first. HIFO treats the most expensive coins as sold first, regardless of when you bought them. Applied to the same sale, each one produces a different cost basis, and therefore a different taxable gain, even though nothing about the trade itself changed.

Is HIFO allowed by the IRS?

The IRS doesn't use the term HIFO in its guidance. What it allows is specific identification: choosing which units you sold, at or before the time of sale, if you can document the date acquired, basis, and fair market value of those exact units. HIFO is simply that rule applied with a consistent goal, selling the highest-cost lot first, rather than a separately named method.

Which cost basis method lowers my crypto tax bill the most?

In a rising market, selling the highest-cost units first, sometimes labeled HIFO, usually reports the smallest gain on the current sale, since FIFO and LIFO both leave higher-cost lots unsold in that case. But it also leaves a lower cost basis in the coins you keep, which raises the gain reported whenever you eventually sell them. It shifts the bill rather than removing it.

Can I switch between FIFO and specific identification whenever I want?

Generally no. Specific identification has to be made at or before the time of each sale and backed by records, not chosen months later while filing to produce the lowest number. Once you adopt an approach for an account, switching it inconsistently, or splitting identification across tools that assume different defaults, is a common way records stop reconciling with what you actually reported.

Does every country let investors choose their cost basis method?

No. The United States permits specific identification alongside a FIFO default, but that is not universal. Some tax authorities require a single pooled average cost across all holdings of the same token instead, with no lot-by-lot choice available. Always check the rule that applies in your own country before assuming a method you've read about applies to you.

Sources

  1. Frequently Asked Questions on Virtual Currency Transactions — Internal Revenue Service (IRS)
  2. Notice 2025-7 — Digital asset basis identification and safe harbor relief — Internal Revenue Service (IRS)
  3. CRYPTO22200 — Cryptoassets for individuals: Capital Gains Tax: pooling — HM Revenue & Customs (HMRC)

This content is for education only and is not financial, investment, tax or legal advice. Crypto assets are volatile and you can lose money. Examples use hypothetical numbers. See our disclaimer and editorial policy.