P2PTab

Crypto cost basis calculator

See how each cost method changes your realized gains on your own transactions, with every match shown. Which method applies depends on where you pay tax.

Which cost basis method does your country use?

Tax authorities don't all match sales to purchases the same way. The calculator runs every method it supports so you can see the one that applies to you and how far the others would differ.

MethodHow a sale is matchedWhere you'll meet it
FIFOOldest coins first, tracked per accountThe default in the US, and required or common in several other countries
LIFO / HIFONewest, or most expensive, coins firstOnly where specific identification of units is allowed, as in the US
Average costOne pool per coin at its average priceCanada's adjusted cost base works this way
UK share poolingSame-day buys, then buys in the next 30 days, then the average-cost poolRequired by HMRC in the UK

Check the rule where you file before relying on any of these; our methodology page spells out exactly what each method does here.

How to read the results

The top table shows proceeds, cost and gain for each method, in the currency your file states its values in. For the lot methods the gain is also split by how long each lot was held, because several countries tax gains on coins held over a year differently. Totals only include matches where both the cost and the proceeds are in the file; the last column counts the ones that aren't.

Open "Every match, by method" to see which purchase or pool each sale was matched to. That list is what you'd check against your tax software if its numbers differ from these.

Why some values show as unknown

Coinbase and Kraken state a value in your account currency for buys and sells, so those work straight away. Binance trades are mostly against USDT, and deposits from other platforms carry no purchase price at all. We show these as unknown rather than filling in a price. The FIFO vs HIFO worked example walks through one sale by hand if you want to check the arithmetic.