Skip to main content
CryptoNomadHub
Back to Documentation
Tax Strategy

FIFO vs LIFO vs HIFO: Which to Choose?

Compare cost basis methods and understand which one optimizes your tax situation.

12 min readLast updated: January 2025

What is Cost Basis?

Cost basis is the original purchase price of an asset. When you sell crypto, the IRS requires you to calculate your capital gain or loss:

Capital Gain/Loss = Selling Price - Cost Basis

The cost basis method you choose determines which specific units you're selling, which directly impacts your taxable gain or loss.

The Three IRS-Approved Methods

FIFO - First In, First Out

Sell the oldest coins first. The first crypto you bought is the first crypto you sell.

Example:

  • • Jan 1: Buy 1 BTC at $40,000
  • • Mar 1: Buy 1 BTC at $50,000
  • • Jun 1: Sell 1 BTC at $60,000
  • FIFO uses Jan purchase: $60,000 - $40,000 = $20,000 gain

LIFO - Last In, First Out

Sell the newest coins first. The last crypto you bought is the first crypto you sell.

Example (same scenario):

  • • Jan 1: Buy 1 BTC at $40,000
  • • Mar 1: Buy 1 BTC at $50,000
  • • Jun 1: Sell 1 BTC at $60,000
  • LIFO uses Mar purchase: $60,000 - $50,000 = $10,000 gain

HIFO - Highest In, First Out

Sell the highest-cost coins first. Choose the purchase with the highest cost to minimize gains.

Example (same scenario):

  • • Jan 1: Buy 1 BTC at $40,000
  • • Mar 1: Buy 1 BTC at $50,000
  • • Jun 1: Sell 1 BTC at $60,000
  • HIFO uses Mar purchase (highest): $60,000 - $50,000 = $10,000 gain

Real-World Comparison

Let's compare all three methods with a realistic scenario:

Your ETH Purchases:

  • • Jan 15: Buy 10 ETH @ $2,000 = $20,000 cost
  • • Mar 20: Buy 5 ETH @ $3,000 = $15,000 cost
  • • Jul 10: Buy 8 ETH @ $1,800 = $14,400 cost
  • • Oct 5: Buy 7 ETH @ $2,500 = $17,500 cost

Today's Sale:

• Dec 1: Sell 12 ETH @ $2,800 = $33,600 revenue

FIFO

Uses oldest first:

  • 10 ETH @ $2,000 = $20,000
  • 2 ETH @ $3,000 = $6,000
  • Total cost: $26,000
Capital Gain:
$7,600

LIFO

Uses newest first:

  • 7 ETH @ $2,500 = $17,500
  • 5 ETH @ $1,800 = $9,000
  • Total cost: $26,500
Capital Gain:
$7,100

HIFO

Uses highest first:

  • 5 ETH @ $3,000 = $15,000
  • 7 ETH @ $2,500 = $17,500
  • Total cost: $32,500
Capital Gain:
$1,100
BEST

Tax Savings with HIFO:

HIFO saves $6,500 in capital gains compared to FIFO. At a 20% tax rate, that's $1,300 in tax savings from choosing the right method!

Which Method Should You Use?

✅ Use FIFO when:

  • • You bought crypto during a bull market (prices went up)
  • • You want to maximize long-term capital gains (lower tax rate after 1 year)
  • • You prefer the default, simplest method
  • • You're a long-term holder selling your earliest positions

✅ Use LIFO when:

  • • You recently bought during a dip
  • • You want to minimize short-term gains (if recent purchases are higher)
  • • Crypto prices have been generally declining
  • • You're actively trading and want to offset recent purchases

✅ Use HIFO when:

  • You want to minimize taxes (best for most traders)
  • • You have purchases at various price points
  • • You're actively managing your tax strategy
  • • You want maximum flexibility and optimization

IRS Rules & Restrictions

⚠️ Important IRS Requirements:

  • 1.Choose once per asset: You must use the same method for all sales of the same cryptocurrency (e.g., all ETH sales must use FIFO or HIFO, but you can use LIFO for BTC)
  • 2.Document everything: Keep records of all purchases with dates, prices, and amounts
  • 3.Be consistent: Once you choose a method for a specific crypto, you should stick with it (though you can technically change)
  • 4.Specific identification required for HIFO: You must specifically identify which coins you're selling at the time of sale

How CryptoNomadHub Handles Cost Basis

Our platform automatically calculates all three methods for you:

  • Automatic calculation: We calculate FIFO, LIFO, and HIFO for every transaction
  • Side-by-side comparison: See exactly how much tax you'll save with each method
  • One-click switching: Change methods and instantly see updated tax implications
  • Form 8949 export: Export IRS tax forms with your chosen method
  • Historical tracking: We remember your purchase dates and prices automatically

Advanced Strategies

💡 Pro Tip: Use HIFO with Tax Loss Harvesting

Combine HIFO with tax loss harvesting for maximum savings:

  • Use HIFO to minimize gains on profitable sales
  • Use FIFO to maximize losses on losing positions
  • Offset gains with losses to reduce total tax liability

Start Optimizing Your Cost Basis

See how much you can save by comparing all three methods on your portfolio.

Calculate Your Cost Basis