Crypto Cost Basis Explained: FIFO vs. LIFO vs. HIFO with Worked Examples
By CryptoSums Editorial Team · Published Jul 11, 2026 · Updated Jul 11, 2026
Two investors buy the same Bitcoin on the same days, sell the same amount at the same price — and report tax bills thousands of dollars apart. Neither is cheating. They chose different answers to a deceptively simple question: when you sell some of a fungible pile, which coins did you sell?
That answer is your cost basis method. Here’s the machinery, with one example run three ways.
The setup
Alice made three purchases of BTC and now sells one coin:
| Lot | Date | Amount | Price paid |
|---|---|---|---|
| 1 | Jan 2023 | 1 BTC | $17,000 |
| 2 | Mar 2024 | 1 BTC | $62,000 |
| 3 | Nov 2024 | 1 BTC | $90,000 |
In June 2026 she sells 1 BTC at $64,000. Her total position cost $169,000 for 3 BTC. What’s her taxable gain?
FIFO: first in, first out
FIFO disposes of the oldest lot first — Lot 1, the $17,000 coin.
Gain = $64,000 − $17,000 = $47,000, and since Lot 1 was held over a year, it’s long-term. FIFO is the default assumption in the US when you don’t (or can’t) specifically identify lots, and the intuition matches how most people think about “their oldest coins.” In a market that has risen over your holding history, FIFO tends to produce the largest current gain — you’re always selling your cheapest, oldest basis first.
LIFO: last in, first out
LIFO disposes of the newest lot — Lot 3, the $90,000 coin.
Gain = $64,000 − $90,000 = −$26,000: a $26,000 loss, short-or-long-term depending on the recent lot’s age (here: over a year, long-term). Same sale, same market — but on paper Alice sold her most expensive coin, harvesting a loss she can use against other gains. LIFO shines after recent buying near local highs; it also tends to realize younger lots, which in the US risks short-term (ordinary-rate) treatment when the recent lot is under a year old.
HIFO: highest in, first out
HIFO — really a strategy applied through specific identification — always disposes of whatever lot has the highest basis, regardless of age. Here that’s again Lot 3 ($90,000), so HIFO matches LIFO’s −$26,000 result. The difference appears with messier histories: HIFO hunts the most expensive basis across all lots, mechanically minimizing the realized gain (or maximizing the harvested loss) on every single disposal.
The catch nobody advertises: HIFO leaves your cheapest lots behind. Alice still holds the $17,000 coin, with its enormous embedded gain, waiting. Basis methods move tax through time; only death, charity or a tax-free jurisdiction make it disappear.
Who may use what
- United States: FIFO by default; specific identification permitted with adequate contemporaneous records — which is how HIFO is implemented in practice. From January 1, 2025, IRS rules (Rev. Proc. 2024-28) require basis to be tracked per wallet/account rather than universally, so lot hygiene got stricter exactly when broker 1099-DA reporting began.
- United Kingdom: no lot choice at all. HMRC mandates share pooling (Section 104): all coins of one asset form a pool at average cost, with same-day and 30-day matching rules to block wash-style harvesting.
- Canada: mandatory adjusted cost base (ACB) averaging per asset — conceptually the UK pool without the 30-day rule (Canada instead applies superficial-loss rules).
- Germany: FIFO is the accepted method for the one-year clock — which interacts beautifully with the tax-free-after-a-year rule: your oldest (most likely tax-free) coins exit first.
- Australia: flexible lot selection is generally accepted with records; the 12-month CGT discount makes lot age a first-class strategic variable.
Making it practical
- Record every acquisition — date, quantity, price, venue — including rewards and airdrops (their receipt value is their basis; see how staking rewards are taxed).
- Pick software early. Method optimization across hundreds of lots is not a spreadsheet job; tax tools apply FIFO/HIFO consistently and produce the audit trail specific identification demands.
- Model before you sell. Compute the raw gain with the profit calculator, then run the realized figure through the tax estimator for your country — under different methods, “the same sale” can land in different brackets entirely.
The method question is where crypto taxes stop being arithmetic and start being strategy. Get the records right and the strategy stays available; lose them and you’re defaulted into FIFO’s answer, usually the most expensive one.
Sources
Disclaimer: This tool provides educational estimates only — it is not financial, investment, or tax advice. Crypto assets are volatile; past performance does not guarantee future results. See our methodology and full disclaimer.