Crypto Cost Basis Calculator (FIFO/LIFO/HIFO)
Purchases (lots)
Total held: 1.2 coins. Include purchase fees in the price: they are part of your cost basis.
Your ordinary income bracket
US federal: 0%, 15% or 20%
Comparison
| Method | Cost basis | Short-term gain | Long-term gain | Est. tax |
|---|---|---|---|---|
| FIFO | $12,200.00 | $0.00 | $56,800.00 | $8,520.00 |
| LIFO | $42,600.00 | $10,800.00 | $15,600.00 | $4,716.00 |
| HIFO | $42,600.00 | $10,800.00 | $15,600.00 | $4,716.00 |
Lowest estimated tax here: LIFO (last in, first out: newest coins sold first).
Proceeds: $69,000.00. Gains held more than one year are long-term. Losses show as negative gains and are not taxed here (they can offset other gains).
Which lots each method sells
FIFO
- 0.5 from 2023-01-10 @ $17,000.00 (long-term, 979 days)
- 0.1 from 2023-11-20 @ $37,000.00 (long-term, 665 days)
LIFO
- 0.4 from 2025-03-05 @ $88,000.00 (short-term, 194 days)
- 0.2 from 2023-11-20 @ $37,000.00 (long-term, 665 days)
HIFO
- 0.4 from 2025-03-05 @ $88,000.00 (short-term, 194 days)
- 0.2 from 2023-11-20 @ $37,000.00 (long-term, 665 days)
Sale on September 15, 2025.
Compare the cost basis, short- and long-term capital gains and estimated tax of a crypto sale under FIFO, LIFO and HIFO, from your purchase lots and the sale, and see exactly which lots each method sells.
Formula
Worked Example
FIFO sells the cheapest, oldest coins, so the basis is only $12,200 on $69,000 of proceeds. Selling the $88,000 lot first raises the basis to $42,600: part of the gain becomes short-term at 22%, but the total gain is so much smaller that the tax falls by $3,804.
Frequently Asked Questions
Which cost basis method can I use for crypto in the US?
FIFO applies unless you specifically identify the units you sold. Methods such as HIFO or LIFO are forms of specific identification and require you to identify the lots at or before the time of the sale and keep records; since 2025 this is tracked wallet by wallet or account by account.
What is the difference between short-term and long-term crypto gains?
Coins held for one year or less produce short-term gains, taxed at ordinary income rates of up to 37%. Coins held longer produce long-term gains, taxed at 0%, 15% or 20% federally, plus the 3.8% net investment income tax for high earners.
Is HIFO always the lowest-tax method?
It minimizes the gain on the current sale, but not always the tax: a high-cost lot may be short-term and taxed at a higher rate, and using up high-basis lots now leaves low-basis lots, and larger gains, for later sales.