Crypto cost basis calculator: FIFO, LIFO or HIFO, which saves more?

Worked example. Three Bitcoin lots: 0.4 BTC bought January 2024 at $45,000, 0.3 BTC bought March 2025 at $85,000 and 0.3 BTC bought June 2026 at $110,000. On December 1, 2026 you sell 0.5 BTC at $100,000, so proceeds are $50,000 (prices are illustrative, no fees).

MethodLots soldCost basisGain / lossTerm
FIFO0.4 from Jan 2024, 0.1 from Mar 2025$26,500$23,500 gainAll long term
HIFO0.3 from Jun 2026, 0.2 from Mar 2025$50,000$0 net$3,000 short-term loss, $3,000 long-term gain

HIFO saves the most this year because it sells the costliest coins first, but it leaves your cheapest lots for later sales, and a mixed result like the one above changes which tax rate applies. At an exchange, a method only counts if you identify the units to the broker by the time of the sale. Try your own lots below.

How to use it
  1. Paste your buys of one coin, one per line: date, quantity, price per coin and an optional fee. The sample shows the format.
  2. Enter the sale: date, quantity, price per coin and fee.
  3. Compare the four methods in the table. Tap a method to see which lots it used; for specific ID, list the lot numbers to sell from.

Dates as 2024-02-01 or 02/01/2024. Pasting from a spreadsheet works (tab separated). Lot numbers follow line order.

MethodProceedsCost basisGain or lossShort termLong term
FIFO (first in, first out)$60,000.00$15,300.00$44,700.00$0.00$44,700.00
LIFO (last in, first out)$60,000.00$42,400.00$17,600.00$17,600.00$0.00
HIFO (highest cost first)$60,000.00$45,000.00$15,000.00$3,600.00$11,400.00
Specific ID (lots you pick)$60,000.00$14,800.00$45,200.00$14,000.00$31,200.00
Lots used by
  • Lot 1 (2023-03-10): 0.5 coins, basis $11,000.00, long term, $39,000.00
  • Lot 2 (2024-02-01): 0.1 coins, basis $4,300.00, long term, $5,700.00

Track this in Hodl1099

Import your Coinbase, Kraken, Crypto.com, Gemini or Robinhood CSV and Hodl1099 keeps every lot wallet by wallet, then builds your Form 8949 lines. Free for up to 15 transactions per tax year.

This is an estimate, not tax advice. It runs in your browser and nothing you type is sent to us.

Crypto Cost Basis Calculator: FIFO, LIFO or HIFO, Which Saves More?