Skip to main content
CryptoNomadHub
Back to Blog
Tax Strategy

FIFO vs LIFO vs HIFO: Which Saves the Most Tax?

July 20, 2025
14 min readBy CryptoNomadHub Team

TL;DR: The cost basis method you choose can save (or cost) you thousands in crypto taxes. HIFO typically saves the most by selling coins with the highest purchase price first, while FIFO is the IRS default. We'll show real examples with exact numbers.

What is Cost Basis?

Cost basis is the original purchase price of an asset. When you sell crypto, your capital gain (or loss) is calculated as:

Capital Gain = Sale Price - Cost Basis

But what if you bought the same cryptocurrency multiple times at different prices? Which purchase do you count as "sold"? That's where cost basis methods come in.

The Three Main Methods

1. FIFO (First In, First Out)

Sell your oldest coins first. The coins you bought earliest are assumed to be sold first.

IRS Default: If you don't specify a method, the IRS assumes FIFO.

2. LIFO (Last In, First Out)

Sell your newest coins first. The coins you bought most recently are assumed to be sold first.

Less Common: Rarely optimal for crypto but useful in specific scenarios.

3. HIFO (Highest In, First Out)

Sell your most expensive coins first. The coins with the highest purchase price are sold first.

Usually Best: Minimizes capital gains by maximizing cost basis.

Real Example: Same Sales, Different Taxes

Let's use a realistic scenario to show how much each method can save you.

Scenario: Sarah's ETH Purchases

Date
Amount
Price/ETH
Jan 2024
5 ETH
$2,000
Apr 2024
3 ETH
$3,000
Jul 2024
4 ETH
$2,500
Total
12 ETH
Avg: $2,417

In December 2024, Sarah sells 8 ETH at $3,500 each = $28,000 total

Method 1: FIFO (First In, First Out)

Sells the oldest coins first: 5 ETH from January + 3 ETH from April

Sale proceeds (8 ETH × $3,500):$28,000
Cost basis (5 ETH × $2,000 + 3 ETH × $3,000):$19,000
Capital Gain:$9,000
Tax (20% long-term):$1,800

Method 2: LIFO (Last In, First Out)

Sells the newest coins first: 4 ETH from July + 3 ETH from April + 1 ETH from January

Sale proceeds (8 ETH × $3,500):$28,000
Cost basis (4×$2,500 + 3×$3,000 + 1×$2,000):$21,000
Capital Gain:$7,000
Tax (20% long-term):$1,400

💰 Saves $400 vs FIFO

Method 3: HIFO (Highest In, First Out)

Sells the most expensive coins first: 3 ETH from April ($3,000) + 4 ETH from July ($2,500) + 1 ETH from January ($2,000)

Sale proceeds (8 ETH × $3,500):$28,000
Cost basis (3×$3,000 + 4×$2,500 + 1×$2,000):$21,000
Capital Gain:$7,000
Tax (20% long-term):$1,400

💰 Saves $400 vs FIFO (same as LIFO in this case)

Side-by-Side Comparison

MethodCost BasisCapital GainTax (20%)Savings
FIFO$19,000$9,000$1,800
LIFO$21,000$7,000$1,400+$400
HIFO$21,000$7,000$1,400+$400

When Each Method is Best

Best for FIFO

  • Rising market: If you bought low early and price keeps rising, FIFO gives you the lowest cost basis
  • Simplicity: IRS default method, requires no special tracking
  • Long-term holdings: Automatically qualifies old coins for long-term capital gains rates

Best for LIFO

  • Falling market: If prices are dropping, newest purchases have higher cost basis
  • Short holding periods acceptable: When you don't need long-term status
  • Frequent buying in downtrends: You keep buying the dip, then prices rally slightly

Best for HIFO (Most Common Winner)

  • Volatile markets: You bought at various prices including some peaks
  • DCA strategy: Dollar-cost averaging creates lots of different cost bases
  • Tax minimization: Pure optimization — always sells highest cost first
  • Flexible timing: Works regardless of market direction

How to Use HIFO (Specific Identification)

To use HIFO (or any method other than FIFO), you must use Specific Identification. The IRS allows this, but requires:

IRS Requirements for Specific Identification:

  1. 1.Identify at time of sale: You must specify which coins you're selling at the time of the transaction (not later when filing taxes)
  2. 2.Keep detailed records: Document purchase date, amount, price, and wallet/exchange for each acquisition
  3. 3.Receive confirmation: Get written confirmation from the exchange/broker of which specific coins were sold
  4. 4.Be consistent: Once you use specific identification, continue using it for that same asset

Tools That Track Cost Basis

Manual tracking is nearly impossible with hundreds of transactions. Use crypto tax software:

CryptoNomadHub

Automatic FIFO, LIFO, HIFO calculation. Supports 50+ chains including Solana, Ethereum, Polygon.

Try Free →

Other Options

Koinly, CoinTracker, CoinLedger, TokenTax, and others also support all three methods.

Common Mistakes to Avoid

❌ Switching methods mid-year

You can't use FIFO for some sales and HIFO for others within the same tax year for the same coin. Pick one method and stick with it.

❌ Not documenting at time of sale

If you use HIFO, you must identify the specific coins at the time of sale. You can't retroactively choose later when filing taxes.

❌ Ignoring wash sales (if applicable)

Currently wash sales don't apply to crypto in most countries, but this may change. If they do apply, your cost basis calculations become more complex.

❌ Forgetting about gas fees

Transaction fees can be added to your cost basis, reducing taxable gains. Don't forget to include them.

Final Thoughts

For most crypto investors, HIFO is the best choice because it minimizes capital gains by maximizing cost basis. However, it requires:

  • Detailed record-keeping of every purchase
  • Identifying specific coins at time of sale
  • Using software to track everything accurately

If you don't specify a method, the IRS defaults to FIFO, which often results in higher taxes. By proactively choosing HIFO and properly documenting it, you can save hundreds or thousands in taxes every year.

Always consult a tax professional before implementing any tax strategy. Rules vary by country, and mistakes can be costly.

Automatically Calculate Cost Basis with All Methods

CryptoNomadHub automatically calculates your gains using FIFO, LIFO, and HIFO, then shows you which method saves the most tax.

Try Free
FIFO vs LIFO vs HIFO Comparison - CryptoNomadHub Blog