FIFO vs LIFO vs HIFO: Which Crypto Cost Basis Method Saves You the Most?
FIFO vs LIFO vs HIFO: What Is the Difference?
FIFO (First In, First Out) sells your oldest coins first, which in a rising market often produces the highest capital gains. HIFO (Highest In, First Out) sells the coins you paid the most for first, minimizing your taxable gains. LIFO (Last In, First Out) sells your most recent purchase first, which can reduce gains if recent prices are higher than older ones. The difference between these methods can mean thousands of dollars in tax savings on the same portfolio.
IRS-Recognized Cost Basis Methods
The IRS recognizes exactly two cost basis identification methods for cryptocurrency:
1. FIFO (First In, First Out)
FIFO is the default method. Per Revenue Ruling 2019-24 (Q&A 39), if you do not specifically identify which units of cryptocurrency you are selling, the IRS treats the oldest units as sold first.
FIFO requires no special record-keeping beyond standard transaction records. Because it is the default, the IRS will apply it automatically if you do not designate a different method.
2. Specific Identification
Specific Identification lets you choose exactly which lots (individual purchase batches) you are selling. This is the only other method the IRS recognizes for crypto, and it requires that you maintain adequate records per IRC Section 1012 showing:
- The date and time of each acquisition
- Your cost basis and the fair market value at acquisition
- The date and time of each sale or disposal
- The fair market value at the time of sale and the amount received
- Which specific units were sold
LIFO and HIFO are not separate IRS-approved methods — they are strategies applied within Specific Identification. When you use HIFO, you are using Specific Identification to designate the highest-cost lot for each sale. When you use LIFO, you are designating the most recently purchased lot.
This distinction matters: on your tax return, you are using "Specific Identification" as your method. HIFO and LIFO describe how you choose which lots to identify.
Concrete Calculation Example
Consider this scenario. You made three purchases of ETH during 2025:
| Lot | Date | Quantity | Price per ETH | Total Cost |
|---|---|---|---|---|
| Lot 1 | Jan 10, 2025 | 2 ETH | $2,400 | $4,800 |
| Lot 2 | Apr 22, 2025 | 3 ETH | $3,800 | $11,400 |
| Lot 3 | Sep 5, 2025 | 1 ETH | $3,200 | $3,200 |
Total holdings: 6 ETH with a total cost of $19,400.
On December 15, 2025, you sell 2 ETH for $4,500 each. Total proceeds: $9,000.
FIFO Result
FIFO sells the oldest lots first. Your 2 ETH from Lot 1 (January 10, $2,400 each) are sold.
- Proceeds: $9,000
- Cost basis: $4,800 (2 ETH at $2,400)
- Capital gain: $4,200 (short-term, held under 1 year)
LIFO Result
LIFO sells the most recent lots first. Your 1 ETH from Lot 3 (September 5, $3,200) and 1 ETH from Lot 2 (April 22, $3,800) are sold.
- Proceeds: $9,000
- Cost basis: $7,000 ($3,200 + $3,800)
- Capital gain: $2,000 (short-term)
HIFO Result
HIFO sells the highest-cost lots first. Your 2 highest-cost ETH are from Lot 2 (April 22, $3,800 each). Two ETH from Lot 2 are sold.
- Proceeds: $9,000
- Cost basis: $7,600 (2 ETH at $3,800)
- Capital gain: $1,400 (short-term)
Comparison Summary
| Method | Cost Basis | Capital Gain | Tax at 24% Bracket |
|---|---|---|---|
| FIFO | $4,800 | $4,200 | $1,008 |
| LIFO | $7,000 | $2,000 | $480 |
| HIFO | $7,600 | $1,400 | $336 |
In this example, HIFO saves $672 in taxes compared to FIFO on a single sale — a 67% reduction in tax liability. Over a full year of trading, the differences compound significantly.
Note: The 24% rate applies to the 2025 single filer bracket of $103,350 to $197,300 (per IRS Revenue Procedure 2024-40). Your actual rate depends on your total taxable income.
When Each Method Is Optimal
FIFO Is Best When:
- Prices have declined since your early purchases: If you bought at high prices early and current prices are lower, FIFO sells those high-cost-basis lots first, producing smaller gains or even losses.
- You want long-term capital gains treatment: FIFO sells your oldest lots, which are most likely to have been held over one year, qualifying for the lower long-term rates (0%, 15%, or 20% vs. up to 37% for short-term).
- Simplicity is the priority: FIFO requires no special lot tracking or identification. It is the default, so if you do not keep detailed records, this is what the IRS applies.
LIFO Is Best When:
- Recent purchases were at higher prices: In a rising market, your most recent buy is your most expensive, so selling it first maximizes cost basis and minimizes gain.
- You are actively trading and recently bought at a peak: If you bought at a local high and the price has since dropped slightly, LIFO lets you sell that high-cost lot.
- You want to defer gains: LIFO preserves your oldest (typically lowest-cost) lots, deferring those gains to future years.
HIFO Is Best When:
- You want to minimize current-year tax liability: HIFO always picks the highest-cost lot available, guaranteeing the smallest possible gain (or largest loss) on each sale.
- You have lots purchased at varying prices: The more price variation in your purchase history, the more HIFO can save compared to FIFO.
- You are tax-loss harvesting: HIFO naturally selects lots with the highest basis, which during a downturn are most likely to produce deductible losses.
Important Caveat: Holding Period
HIFO optimizes for lowest gain but may sacrifice long-term capital gains treatment. If your highest-cost lot is a recent purchase (held under one year), HIFO produces a short-term gain taxed at ordinary income rates up to 37%. A lower-cost lot held over one year would produce a larger gain but taxed at the preferential long-term rate of 0%, 15%, or 20%.
The optimal strategy often balances cost basis against holding period. This is where a tax-lot-aware calculator becomes essential — it can model the after-tax outcome under each method, accounting for both basis and holding period.
Per-Asset Consistency Requirement
Per IRS FAQ Q39 (updated 2024), you must apply your cost basis method consistently on a per-asset basis. However, you can use different methods for different assets. For example:
- FIFO for BTC (where you want long-term treatment on your oldest lots)
- HIFO for ETH (where you want to minimize short-term gains from active trading)
This flexibility allows you to optimize your tax strategy by asset, but you must be consistent within each asset throughout the tax year.
You Cannot Switch Methods Retroactively
Once you have filed a tax return using a particular cost basis method for an asset, you cannot go back and recalculate prior-year transactions with a different method. Under IRC Section 1012 and general tax accounting principles:
- Changing your accounting method for cost basis requires IRS approval (Form 3115, Application for Change in Accounting Method)
- The change applies prospectively, not retroactively
- You cannot amend a prior return solely to switch from FIFO to HIFO for a more favorable outcome
This makes method selection a consequential decision. Before filing, model your portfolio under each method to understand the long-term implications — not just the current-year savings.
Specific Identification Record-Keeping Requirements
If you use HIFO or LIFO (as variants of Specific Identification), the IRS requires adequate records per Revenue Ruling 2019-24. Specifically, you must document:
- At the time of disposal: Which specific units (lots) you are designating as sold
- Lot-level detail: For each lot, the date acquired, cost basis, and quantity
- Contemporaneous records: The identification should ideally be made at or before the time of the transaction, not retroactively at tax time
In practice, using a crypto tax calculator that maintains lot-level tracking satisfies these requirements. The software records which lots are consumed by each sale, creating an auditable trail.
Without adequate documentation, the IRS can reject your Specific Identification and default you to FIFO — potentially increasing your tax liability significantly.
Using dTax to Compare Methods
dTax supports all four cost basis methods — FIFO, LIFO, HIFO, and Specific Identification — and lets you compare them side by side before filing. The tax engine maintains lot-level cost basis with sourceId tracking from TaxLot through to Form 8949 generation, ensuring every gain and loss is traceable to a specific purchase.
The comparison feature shows:
- Total capital gains under each method
- Short-term vs. long-term breakdown
- Estimated tax liability at your bracket
- Remaining lot inventory and unrealized gains
This lets you make an informed, data-driven decision about which method to use — before you commit by filing.
Wash Sale Considerations
The IRS proposed regulations in 2024 (REG-106013-19) to extend wash sale rules under IRC Section 1091 to digital assets. If finalized, selling crypto at a loss and repurchasing the same asset within 30 days before or after the sale would disallow the loss.
Wash sales interact with cost basis method selection:
- Under HIFO, you are more likely to sell high-cost lots at a loss during downturns — but if you rebuy within 30 days, the loss may be disallowed
- The disallowed loss gets added to the cost basis of the replacement lot, deferring (not eliminating) the tax benefit
- FIFO is less likely to trigger wash sales because you sell your oldest lots, which are less likely to be at a loss in a long-term uptrend
Check current IRS guidance for whether wash sale rules apply to digital assets in your filing year.
FAQ
Can I use different methods for different coins?
Yes. Per IRS FAQ Q39, you can use FIFO for one cryptocurrency and Specific Identification (HIFO, LIFO) for another. The requirement is consistency within each asset — once you choose a method for BTC, you must use it for all BTC disposals in that tax year. You can use a different method for ETH, SOL, or any other asset. This allows you to optimize your tax strategy per asset based on your purchase history and holding periods.
Is HIFO legal?
Yes, HIFO is legal. It is not a separate IRS-approved method but rather a strategy within the IRS-approved Specific Identification method. When you use HIFO, you are specifically identifying the highest-cost lots for each sale — which is permitted under Revenue Ruling 2019-24 as long as you maintain adequate records. The IRS does not prohibit choosing lots that minimize your tax liability. However, some tax forms and software may list your method as "Specific Identification" rather than "HIFO" since that is the official IRS terminology.
Can I switch methods mid-year?
No, you should not switch cost basis methods for the same asset within a tax year. Per IRS consistency requirements, if you use FIFO for your January BTC sale, you should use FIFO for all BTC sales that year. You can change methods in a subsequent tax year, but the change only applies to new transactions going forward — you cannot retroactively recalculate prior disposals. If you have already filed using one method and want to switch, you may need to file Form 3115 (Application for Change in Accounting Method) with the IRS. Before committing to a method, compare all options using a tool like dTax to ensure you are choosing the optimal strategy for your full-year portfolio.