Three purchases of Bitcoin. One sale. Your tax bill could be $6,000 — or $750 — depending on which cost basis method you use.
FIFO, LIFO, and HIFO are accounting methods that determine which coins you're treated as having sold when you dispose of cryptocurrency. The choice directly shapes your crypto tax bill. And unlike many tax decisions, the IRS gives you real flexibility here — if you know how to use it.
What Is Cost Basis in Crypto?
Cost basis is the original value of a crypto asset for tax purposes — what you paid for it, including fees and commissions. When you sell or trade, your taxable gain or loss is the difference between your sale price and your cost basis.
The IRS treats cryptocurrency as property, not currency. That means capital gains rules apply every time you sell, trade, or spend crypto — these are taxable events. Your cost basis determines whether you've got a gain or a loss, and how big.
Short-term vs. long-term rates make a big difference. Crypto held more than one year qualifies for long-term capital gains rates (0%, 15%, or 20%). Hold for a year or less and those are short-term capital gains — taxed as ordinary income at up to 37%. Your cost basis method affects not just the size of your gain, but which rate applies.
Your cost basis also includes transaction fees. Pay $25,000 for 1 Bitcoin plus $50 in exchange fees? Your cost basis is $25,050. Every dollar in fees reduces your eventual taxable gain. (Yes, gas fees count too.)
Why Your Cost Basis Method Matters
Here's the problem: you've bought the same cryptocurrency multiple times at different prices. Which coins did you just sell? The ones you bought first? The most recent? The most expensive?
Each answer produces a different taxable gain. Over a portfolio with hundreds of transactions, that difference can easily run into thousands of dollars.
The IRS defaults to FIFO — first in, first out — if you don't specify otherwise. But you can elect to use specific identification, which lets you choose exactly which lots you're selling. That election is what unlocks HIFO and LIFO.
Your accounting method isn't just bookkeeping. It shapes your tax liability on every single disposal. Getting it right is one of the few legitimate levers crypto investors have to reduce what they owe.
What Is FIFO? (First In, First Out)
FIFO — first in, first out — is the IRS default. When you sell cryptocurrency, FIFO assumes you sold the coins you bought earliest first.
How it works: You bought 1 BTC in January 2022 at $38,000 and another in January 2024 at $45,000. Sell 1 BTC in March 2025 and FIFO uses the $38,000 cost basis — your gain is calculated against your oldest purchase.
When FIFO works in your favor:
- Falling market: older coins often have higher cost basis than recent ones, which shrinks your gain
- Long-term holders: oldest coins past the one-year mark automatically get the lower long-term capital gains rate
- Simplicity: no lot-level tracking needed — your exchange CSV is usually all you need
When FIFO works against you: In a sustained bull market, your earliest coins have the lowest cost basis and the largest gains. Bitcoin went from $10,000 to $50,000? FIFO hands you a $40,000 gain while your newer, higher-cost purchases sit untouched.
What Is LIFO? (Last In, First Out)
LIFO — last in, first out — treats your most recently purchased coins as the first ones sold. The opposite of FIFO.
The IRS doesn't explicitly approve LIFO as a standalone method for crypto. To use it, you need a specific identification election and documentation of which lots you're selecting at the time of each sale. Most crypto tax software handles this by automatically selecting the most recently acquired lots.
How LIFO can help: In a rising market, your most recent purchases often have higher cost bases. Using them reduces your gain — though if those recent purchases are less than a year old, you might trade a long-term gain for a smaller but short-term one.
But HIFO usually beats LIFO. It picks the highest-cost lots regardless of when you bought them, including older high-cost acquisitions that LIFO would skip. More on that below.
What Is HIFO? (Highest In, First Out)
HIFO — highest in, first out — is the most tax-efficient method for most active crypto traders. It always uses the lots with the highest cost basis first, maximizing the cost applied against your sale price and minimizing your taxable gain.
Here's the catch: HIFO requires serious record-keeping. Every lot needs documentation.
How it works: Every time you sell, HIFO scans your available lots and picks the one you paid the most for. Paid $45,000 for one Bitcoin and $10,000 for another? HIFO uses the $45,000 lot first.
Why HIFO usually wins:
- Smallest gains (or largest losses) on each individual sale — full stop
- Works regardless of short-term vs. long-term status. It just picks the highest cost.
- Powerful for tax loss harvesting — HIFO automatically surfaces your highest-basis lots when you need losses
The requirement: HIFO is a form of specific identification under IRS rules. You need detailed records for every lot: acquisition date, purchase price, wallet address or unique identifier. Without those records, the IRS defaults to FIFO.
Specific Identification Method
Specific identification is the IRS-recognized framework that underpins both HIFO and LIFO. Per IRS guidance, you can identify exactly which cryptocurrency units you're disposing of — provided you document:
- Unique digital identifiers (transaction hash, public key, or wallet address)
- Date and time of acquisition
- Cost basis at acquisition (in USD)
- Date and time of disposal
- Fair market value at disposal
The identification must happen at or before the time of sale — not retroactively when you're preparing your return. This is where most HIFO attempts fall apart: traders select HIFO in their software but haven't kept the underlying lot-level data. No data, no HIFO.
Record-keeping isn't a technicality here. It's the whole foundation.
FIFO vs LIFO vs HIFO: Side-by-Side Example
When you compare fifo vs lifo crypto tax outcomes using the same portfolio, the difference is dramatic. Same sale. Three very different tax bills.
Scenario: You hold 3 Bitcoin acquired at different times:
| Lot | Acquisition Date | Cost Basis | Term at Sale Date |
|---|---|---|---|
| Lot A | January 2022 | $10,000 | Long-term |
| Lot B | June 2023 | $45,000 | Long-term |
| Lot C | January 2025 | $30,000 | Short-term |
You sell 1 BTC in March 2025 at $50,000.
| Method | Lot Used | Cost Basis | Gain | Holding Period | Est. Tax (15% LT / 24% ST) |
|---|---|---|---|---|---|
| FIFO | Lot A | $10,000 | $40,000 | Long-term | ~$6,000 |
| LIFO | Lot C | $30,000 | $20,000 | Short-term | ~$4,800 |
| HIFO | Lot B | $45,000 | $5,000 | Long-term | ~$750 |
$5,250 difference. From one sale.
HIFO outperforms LIFO here because Lot B (the highest-cost lot) is also long-term. HIFO picked a $45,000 basis with a small long-term gain. LIFO picked the most recent lot — a $30,000 basis with a larger short-term gain. And FIFO? It grabbed the oldest lot at $10,000 and produced the worst outcome by far.
This is why HIFO tends to be optimal: it finds the highest cost regardless of purchase date, and when that high-cost lot is long-term, you get both a smaller gain and the better tax rate.
Which Cost Basis Method Should You Use?
HIFO is the right choice for most active crypto traders. That's not a hedge — it's the math.
Use FIFO If...
- You want simplicity — no lot-level tracking needed
- Most coins are held long-term (FIFO locks in the lower long-term rate automatically)
- You're in a lower tax bracket where method differences are modest
- Your portfolio has few transactions and modest gains
Use HIFO If...
- You want to minimize taxable gains on every sale (and you will)
- You trade actively with lots acquired at different prices
- You or your tax software maintains per-lot records in real time
- You're in a mid-to-high bracket (22–37%) where method differences compound quickly
A Note on LIFO
LIFO underperforms HIFO because it only looks at recency, not cost. If your most recent purchases are also your highest-cost ones, LIFO and HIFO produce identical results — but that's coincidence. For most US traders using specific identification, HIFO is the better default. Don't settle for LIFO if HIFO is available.
Can You Switch Methods?
Yes — you can change your cost basis method from one tax year to the next. No IRS rule requires you to stick with the same approach year after year. But:
- Consistency within a single tax year matters — mixing HIFO on some sales and FIFO on others in the same year creates documentation headaches
- Per the Tax Foundation, record integrity is the IRS's primary enforcement concern for crypto cost basis
- Switching from FIFO to HIFO after years of FIFO filings? Talk to a crypto tax professional first, especially if you have large unrealized positions
Record-Keeping: What You Actually Need
The gap between FIFO and HIFO isn't just mathematical — it's operational.
For FIFO: Your exchange transaction history is sufficient. Most exchanges export it as a CSV.
For HIFO / Specific Identification: Per-lot records for every asset you hold. For each lot you need: acquisition date and time, purchase price in USD (including fees), a unique identifier (transaction hash or wallet address), disposal date, and sale price.
The IRS requires lot identification at or before the time of sale — not retroactively. Can't prove you identified specific lots in real time? The IRS may revert to FIFO.
Per IRS digital assets guidance, all crypto disposals go on Form 8949. Your accounting method determines the cost basis on every line. CoinTracking tracks per-lot data automatically as you import exchanges — and lets you compare FIFO, LIFO, HIFO, and average cost before you file.
Cost Basis Methods Outside the US
FIFO, LIFO, and HIFO are US-centric concepts. If you're filing elsewhere, the rules change — sometimes dramatically.
United Kingdom: HMRC requires Section 104 pooling (share pooling) for crypto assets. All coins of the same type share an averaged cost basis. FIFO, LIFO, and HIFO are not permitted. See the HMRC guidance on cryptoassets or our UK crypto tax guide.
Germany: Generally FIFO or average cost. Individual lot identification isn't standard. See our Germany crypto tax guide.
Australia: The ATO allows specific identification — so HIFO is technically available with proper documentation.
Canada: Adjusted Cost Base (ACB) averages all acquisitions of the same asset. No individual lot selection.
CoinTracking handles jurisdiction-specific accounting methods for over 100 countries. For a full breakdown of American rules, our US crypto tax guide covers it in detail.
One more thing: for DeFi taxes and staking taxes, cost basis works differently. Under IRS Revenue Ruling 2023-14, staking rewards are income at fair market value when received — and that FMV becomes your cost basis for future disposals.
How CoinTracking Handles FIFO, LIFO, and HIFO
CoinTracking has supported all major cost basis methods since 2012. Over 1.6 million users rely on it to track portfolios and prepare tax reports — including the method comparisons that actually matter at filing time.
- Import from 300+ exchanges: Full transaction history with per-lot records maintained automatically
- Compare methods instantly: Run FIFO, LIFO, HIFO, and average cost side by side before committing
- Form 8949-ready reports: Every disposal mapped to a specific lot with the right cost basis and holding period
- Global rules supported: Section 104 pooling for UK, ACB for Canada, and other jurisdictions built in
Import your exchange data, use the crypto tax calculator to compare methods, and run the crypto portfolio tracker year-round to stay HIFO-ready.
Find Your Lowest Tax Bill Run your portfolio under FIFO, LIFO, and HIFO instantly with CoinTracking. See which method saves you the most — then export your tax reports. Get Started Free →