Crypto Tax Lot Calculator (FIFO / LIFO / HIFO)

Calculate capital gains/losses from crypto disposals using FIFO, LIFO, or HIFO

Enter acquisition lots (date, quantity, cost basis) and disposal events (date, quantity, proceeds) to compute gains/losses under FIFO, LIFO, or HIFO accounting methods. Shows short-term vs long-term holding periods for self-filing crypto tax returns in the US or UK. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is the difference between FIFO, LIFO, and HIFO?

FIFO sells your oldest lots first, LIFO sells your newest first, and HIFO sells your highest-cost lots first. HIFO usually minimises taxable gains, but the IRS requires you to specifically identify lots to use it. FIFO is the default if no method is documented.

Selling crypto creates a taxable disposal, and the gain depends entirely on which acquisition lot you match it against. This calculator lets you enter your buys and sells, pick an accounting method, and see the matched cost basis, gain or loss, and holding period for every disposal.

How it works

Each disposal is filled by drawing down open lots in an order set by the method:

FIFO  → consume oldest lots first (sort lots by date ascending)
LIFO  → consume newest lots first (sort lots by date descending)
HIFO  → consume highest unit-cost lots first (sort by cost/qty descending)

unit cost basis = lot total cost / lot quantity
matched basis   = unit cost basis × quantity taken from that lot
gain            = proceeds share − matched basis
holding period  = disposal date − acquisition date  (long-term if > 365 days)

Proceeds for a disposal are split across the lots it touches in proportion to the quantity taken from each, so a single sell can produce both a short-term and a long-term component.

Side-by-side example: the same trades, three tax outcomes

You purchased BTC in two lots: 1 BTC in January for $20,000 and 1 BTC in June for $40,000. In December you sell 1 BTC for $50,000.

MethodLot matchedCost basisGainHolding period
FIFOJanuary ($20,000)$20,000$30,00011+ months (long-term)
LIFOJune ($40,000)$40,000$10,000~6 months (short-term)
HIFOJune ($40,000)$40,000$10,000~6 months (short-term)

FIFO produces the largest gain but also a long-term holding period, which in the US is taxed at a lower rate than short-term gains. LIFO/HIFO produce a smaller gain but a short-term holding period, which is taxed as ordinary income. Which is best depends on your tax bracket and marginal rates — the calculator surfaces the numbers, but the planning choice is yours.

When HIFO requires specific identification

In the US, FIFO is the IRS default when no method is documented. To use HIFO (or LIFO), the IRS requires that you specifically identify the lot at the time of sale, with adequate records. “Adequate records” means you can show which lot was sold — the exchange confirmation and your accounting records must match. Simply choosing HIFO in retrospect at tax time is not compliant.

If you use a crypto tax software platform, check whether it sends specific-ID instructions to your exchange at the time of trade or only applies the method retroactively. The former satisfies the IRS requirement; the latter may not.

UK treatment: Section 104 pooling

In the UK, HMRC requires a pooled average cost for cryptoassets (the Section 104 pool), not lot-specific accounting. FIFO, LIFO, and HIFO do not apply as primary methods — instead all acquisitions of the same token are pooled and disposals draw from the pool at the average cost. The same-day rule and 30-day bed-and-breakfasting rule are applied first (see the Crypto Wash Sale Rule tool) before the pool.

Practical notes

  • Keep every lot’s date and cost accurate — errors compound across chained disposals, and the holding-period flag depends on exact dates.
  • A single sell that spans multiple lots will show proportioned proceeds and basis per lot — review the breakdown to catch partial-lot rounding.
  • Transaction fees at acquisition (gas, exchange fees) can generally be added to cost basis; fees at disposal reduce proceeds. This tool uses the raw cost and proceeds you enter — add fees to those figures before inputting them.
  • This is a planning and estimation aid, not a substitute for qualified tax advice.