This article covers the two most common cost basis methods for calculating crypto taxes — FIFO and HIFO — and shows exactly how each one changes your taxable gain on the same transaction. If you've bought the same coin multiple times at different prices and then sold some of it, the method you choose determines how much you owe. That's not a trivial detail. It can be the difference between a large tax bill and a small one.
What Cost Basis Actually Means
When you sell crypto, you don't pay tax on the full sale price. You pay tax on the gain — the difference between what you sold it for and what you originally paid. The price you originally paid is your cost basis. The problem is straightforward: if you bought ETH three separate times at three different prices, and then sold some of it, which purchase price counts as your cost basis? That's what a cost basis method decides.
- Your cost basis is the original purchase price of a specific unit of crypto, including any transaction fees you paid to acquire it
- When you sell, your taxable gain (or loss) equals the sale price minus the cost basis: sell at $3,000, cost basis of $1,800, gain is $1,200
- If you bought the same asset multiple times, you have multiple tax lots — each purchase is its own lot with its own cost basis and date
- The cost basis method is the rule that determines which tax lot gets matched to a sale
- The IRS does not auto-assign a method for crypto the way brokerages do for stocks — you need to pick one and apply it consistently
What this means practically: You could have ten different cost bases for the same coin. The method you choose picks which one counts when you sell.
FIFO: First In, First Out
FIFO means exactly what it sounds like: the first coins you bought are treated as the first coins you sell. If you bought 1 ETH in January and 1 ETH in June, then sold 1 ETH in September, FIFO says you sold the January ETH. This is the default assumption most tax software uses, and it's the method the IRS defaults to if you don't specify one.
- FIFO always matches your oldest tax lot to your next sale
- Because crypto has generally risen over long periods, your oldest lots often have the lowest cost basis — meaning FIFO frequently produces the largest taxable gain
- The upside: FIFO is simple to track and universally accepted
- The downside: in a rising market, it's often the most expensive method tax-wise
- FIFO also tends to convert short-term gains into long-term gains faster, since you're disposing of older lots first — and long-term capital gains rates are lower
What this means practically: FIFO is the safe, simple choice. But "simple" can mean "you pay more than you need to."
HIFO: Highest In, First Out
HIFO matches your sale to whichever tax lot has the highest cost basis — regardless of when you bought it. If you bought 1 ETH at $1,000, then 1 ETH at $3,200, then sold 1 ETH at $3,500, HIFO uses the $3,200 lot. Your taxable gain drops from $2,500 (under FIFO) to $300 (under HIFO). Same sale, same coins, dramatically different tax outcome.
- HIFO minimizes your taxable gain on every individual sale by always using the most expensive lot
- This is where most explanations go wrong: HIFO doesn't eliminate tax — it defers it. The cheap lots you skipped still exist and will produce larger gains when you eventually sell them
- HIFO requires specific identification, meaning you must be able to identify exactly which lot you're selling at the time of the transaction — not after the fact
- The IRS allows specific identification for crypto, but you need records that prove which lot was designated before or at the time of sale
- Most crypto tax software (Koinly, CoinTracker, CoinLedger) supports HIFO as a selectable method and handles the lot matching automatically
What this means practically: HIFO gives you the smallest gain now, but leaves behind low-cost-basis lots that will generate bigger gains later. It's tax deferral, not tax elimination.
A Side-by-Side Example
Suppose you made three purchases of SOL during 2024:
- Lot A: 10 SOL at $20 each (January)
- Lot B: 10 SOL at $90 each (April)
- Lot C: 10 SOL at $150 each (August)
In October, you sell 10 SOL at $160 each — a $1,600 total sale.
Under FIFO, you sell Lot A (oldest first). Cost basis: 10 × $20 = $200. Gain: $1,600 − $200 = $1,400.
Under HIFO, you sell Lot C (highest cost first). Cost basis: 10 × $150 = $1,500. Gain: $1,600 − $1,500 = $100.
Same transaction. The difference in taxable gain is $1,300. At a 24% marginal tax rate, that's $312 in real money.
- After this sale, FIFO leaves you holding Lots B and C (higher-cost lots remaining)
- HIFO leaves you holding Lots A and B (lower-cost lots remaining) — those will produce larger gains on future sales
- Neither method is "cheating" — both are legitimate, and the total lifetime tax across all lots sold eventually converges
What this means practically: HIFO produces a dramatically lower tax bill on this sale. But the remaining lots under HIFO carry more embedded future tax liability.
How to Choose Between Them
This isn't a decision you make in a vacuum. It depends on your actual portfolio, your income this year, and your plans.
1. Assess your current tax year. If you've already realized large gains this year, HIFO on remaining sales reduces the damage. If your income is unusually low this year, FIFO might let you realize gains at a lower tax bracket.
2. Check your holding periods. FIFO tends to sell your oldest lots, which are more likely to qualify for long-term capital gains rates (held over one year). HIFO might sell a lot you bought two months ago, triggering short-term rates — which are higher. Run both scenarios.
3. Pick a method and document it. The IRS expects consistency. You can use different methods in different tax years, but switching mid-year or retroactively re-assigning lots invites scrutiny. Choose before you start selling.
4. Ensure your records support specific identification if using HIFO. You need contemporaneous records showing which lot you designated at the time of sale. Tax software that timestamps lot selection satisfies this. A spreadsheet you filled in months later may not.
What this means practically: Run both calculations before you commit. The "best" method depends on your specific lots, holding periods, and tax bracket — not on a general rule.
Common Mistakes That Create Real Problems
Cost basis errors are the single most common source of crypto tax trouble, and most of them come from the same few mistakes.
- Using HIFO without maintaining specific identification records — the IRS can force you back to FIFO if you can't prove lot selection
- Forgetting that transferring crypto between your own wallets is not a taxable event but does need tracking — if your software loses the cost basis during a transfer, it may default to $0, creating a phantom gain
- Mixing methods across exchanges without realizing it — if Coinbase uses FIFO and your tax software uses HIFO, your records will conflict
- Ignoring transaction fees — fees paid to buy crypto increase your cost basis, and fees paid to sell reduce your proceeds. Both reduce your taxable gain. Leaving them out means you overpay.
What this means practically: The method matters, but accurate record-keeping matters more. A perfect method applied to broken data produces a wrong tax return.
Quick Recap
- Cost basis method determines which purchase price is matched to a sale when you've bought the same asset multiple times — it directly changes your taxable gain
- FIFO (first in, first out) is the default, uses your oldest lots first, and often produces the largest gain in a rising market — but it's simple and safe
- HIFO (highest in, first out) minimizes your current taxable gain by using your most expensive lots first — but it defers tax rather than eliminating it, and requires specific identification records
- Run both calculations with your actual data before choosing — the right answer depends on your lots, holding periods, and tax bracket, not on which method sounds better in theory