Crypto Cost Basis Calculator
Track multiple buy lots, sell some, and see exactly which units are matched under FIFO, LIFO, or HIFO.
FIFO vs LIFO vs HIFO โ Which Should You Use?
FIFO (First In, First Out) sells your oldest lots first. Good for qualifying long-term gains in jurisdictions that reward holding (US, Germany, Portugal). May produce larger gains in rising markets since oldest = cheapest.
LIFO (Last In, First Out) sells your newest lots first. In rising markets, may reduce taxable gain since newest = most expensive. Less common in real-world tax filings.
HIFO (Highest In, First Out) sells your most expensive lots first. Minimises current-year taxable gain. Allowed in the US with proper specific identification. The most aggressive tax-optimisation method.
Allowed methods vary by country:
- US โ FIFO default; LIFO and HIFO permitted with specific identification.
- UK โ Share pooling under TCGA 1992 ยง104 (different from FIFO/LIFO).
- Canada โ Adjusted Cost Base (weighted-average).
- Germany โ FIFO required (per wallet).
- Australia โ FIFO or specific identification.
Cost Basis Calculator FAQs
Does this calculator work for the UK or Canada?
This calculator demonstrates FIFO, LIFO, and HIFO matching. The UK uses share pooling (different) and Canada uses Adjusted Cost Base (weighted-average) โ neither of which is FIFO/LIFO/HIFO. UK and Canadian filers may still find the FIFO output useful as a starting point but should not use the LIFO/HIFO results directly.
Can I save my lot history?
This calculator does not save data โ refresh and the lots are gone. For ongoing tracking use dedicated crypto tax software (Koinly, CoinTracker, etc.) that imports directly from exchanges.
What if I sold more than I bought?
The calculator will use all available lots and flag the shortfall. In practice this would indicate either missing buy lots in your records or a short-sale position โ both of which need careful review.