← Crypto Calculator Tools

Crypto Cost Basis Calculator

Compare FIFO, LIFO, and HIFO side by side across multiple buy lots to see exactly how much taxable gain each accounting method produces for a single sale.

1. Your buy lots

Add every purchase of this asset that could be used to cover the sale below.

QuantityPrice per unit (USD)Purchase date

2. The sale

How to use this calculator

Comparing cost-basis methods takes four steps:

  • Add every purchase (“lot”) of the asset, with its quantity, price per unit, and purchase date.
  • Enter the quantity, price, and date of the sale you want to analyze.
  • Compare the taxable gain or loss across FIFO, LIFO, and HIFO instantly.
  • Click a different method to see which specific lots it consumes and each lot's holding period.

The method highlighted “Lowest gain” is whichever produces the smallest taxable gain for this sale - useful for comparison, but only usable on your return if you keep the specific-identification records required to back it up.

FAQ

Which cost basis method should I use?

In the US, FIFO (first-in, first-out) is the default if you don't document an alternative. HIFO (highest cost first) generally minimizes taxable gains but requires specific-identification records showing exactly which lot you sold. LIFO is rarely used for crypto but is included here for comparison.

Can I switch between FIFO, LIFO, and HIFO for the same sale?

Only if you keep the specific-identification records required to prove which lot you sold - IRS guidance requires consistent, documented tracking. This tool is for comparing the outcomes, not for picking a method after the fact.

Does this calculator save or send my data anywhere?

No. Everything here runs in your browser and resets when you leave the page. Nothing you type is sent to Blockstats or stored.

This is an educational estimate, not tax advice. It runs entirely in your browser - nothing you type here is sent anywhere or stored. Crypto tax rules are complex and change often; confirm your numbers with a licensed tax professional or the IRS before filing.

Want this done for your whole portfolio automatically?

Blockstats syncs every wallet and exchange, runs these calculations across every transaction, and keeps your cost basis and tax summary up to date all year.

Get Started Free