CryptoTaxCalc logo CryptoTaxCalc
September 10, 2026 · 10 min read

How to Calculate Your Crypto Cost Basis: FIFO, HIFO and Specific ID in 5 Countries

Crypto cost basis: coins with dated purchase receipts on a timeline illustrating FIFO matching

Here's a number that causes more crypto tax pain than any tax rate: the cost basis.

Your sale price is easy. The exchange shows it in big friendly numbers, and your bank statement agrees. Basis is the archaeology. It's the answer to "what exactly did the coins you just sold originally cost you?" — and when you've bought the same coin in five chunks at five different prices, that question has three or four defensible answers depending on which country you live in.

Pick the wrong answer (or no answer, which is what most people actually do) and you can overpay by thousands. Let's work the mechanics with real numbers and then map the rules country by country.

What cost basis actually is

Basis is your acquisition cost: the fiat you spent to buy the coins, plus the fees you paid to buy them. When you eventually sell, the gain is proceeds minus basis minus disposal fees.

Three ways coins land in your wallet with a basis that isn't a purchase:

The one example that explains every method

Suppose you bought Bitcoin twice and sold one coin:

You sold one identical coin out of a pile of two. Which one left the building?

Same trades, same sale price, $5,000 of difference in taxable gain. At a 24% rate, that's $1,200 of tax decided entirely by bookkeeping. The remaining coin carries whatever basis wasn't used, so HIFO isn't tax avoidance — it's reordering. You're deciding which coin to dispose of first, and every coin still gets taxed exactly once eventually.

United States: FIFO by default, specific ID if you can prove it

The IRS position (Notice 2014-21 and later guidance) is that you may specifically identify which units you're disposing of — but only if you have records showing, per unit, the date and time of acquisition, the basis, the fair market value when acquired, the proceeds and the date of sale. A wallet or exchange export that preserves unit-level history qualifies; a vague "I think those were the expensive ones" does not.

HIFO isn't a separate legal method — it's specific identification where you always choose the highest-basis units first to minimize current gain. It's legitimate in the US when those unit records exist, and most professional software offers it. Without adequate identification, FIFO is the standard fallback, and the IRS has proposed broker-reporting regulations that would formalize FIFO-style treatment when a customer doesn't identify units through their broker.

One thing specific ID does not do: change your holding period. Sell the August coin in December and that gain is short-term; the January coin stays in your wallet, still aging toward long-term rates. Method and holding clock are separate questions — you can see how much each answer matters on the US calculator by toggling the holding period.

United Kingdom: you don't choose — you use the pool

This is where Americans opening HMRC guidance get a shock. There is no FIFO election and no HIFO for crypto in the UK. Every token of the same kind you hold lives in a single Section 104 holding pool with a blended average cost. Buy 1 BTC at £20,000 and 1 BTC at £40,000 and the pool says each coin has a £30,000 basis. Selling one gives a gain of sale price minus £30,000. Clean, mechanical, and impossible to optimize by coin selection.

On top of the pool sit two anti-avoidance ordering rules:

  1. Same-day rule: coins bought and sold on the same day are matched to each other first.
  2. Bed-and-breakfast rule: if you sell and then buy the same token within 30 days, those new purchases are matched against the sale before the pool is touched — which quietly kills the classic sell-low-buy-back tax trick.

Only after those matches does the Section 104 pool supply basis. This is HMRC's deliberate design: averaging plus 30-day matching removes most of the timing games. If you're planning a UK loss harvest, the UK calculator shows the numbers but make sure you understand the 30-day window first — my loss-harvesting guide walks through it.

Canada: adjusted cost base, also averaged

The CRA requires an adjusted cost base (ACB): the average cost of all identical properties you hold. Same principle as the UK pool, different name. Buy two BTC at $40,000 and $90,000 CAD and each has an ACB of $65,000. Disposal fees reduce your proceeds; acquisition fees go into the ACB.

Because averaging is mandatory, HIFO is simply unavailable to Canadian taxpayers, which surprises people who watched US YouTubers explain it. What you do get is the 50% inclusion rate (on annual gains up to $250,000) — only half the gain enters income. The Canadian calculator applies the inclusion math; you just need the average basis right.

Australia: FIFO usually, specific ID with records

The ATO doesn't prescribe a single crypto method the way HMRC prescribes pooling. In practice most taxpayers use FIFO, which the ATO accepts as reasonable when records are consistent. You can specifically identify units if your records genuinely track them — which makes HIFO theoretically available to well-organized Australian investors — but the method has to be applied consistently, not retroactively cherry-picked per transaction.

The basis number that matters most in Australia is the one that proves the 12-month discount: to halve your taxable gain you must show the specific disposed units were held longer than 12 months. That's a holding-period record problem as much as a basis problem, and it's another reason dated transaction exports matter.

Germany: FIFO in practice, and the year that overrides everything

German tax offices generally apply FIFO for partial sales — the oldest coins are deemed sold first — and LIFO isn't accepted. But honestly, basis method is often the second question in Germany. The first is the holding period: if the outgoing coins were held over 365 days, the gain is exempt regardless of matching, so FIFO is working in your favor by consuming the oldest, most likely tax-free coins first. Inside the first year, and above the €1,000 Freigrenze, FIFO basis then decides the taxable number. The full exemption mechanics are in the Germany one-year-rule guide.

The records that make or break all of this

Notice what every favorable method has in common — it's not cleverness, it's documentation. Specific ID and HIFO exist only if your records can identify units. The tax authorities don't audit your method so much as audit your evidence:

If you've been exporting CSVs from your exchanges as you go, you're in good shape. The batch importer on the homepage reads those files entirely in your browser — nothing uploaded — maps flexible headers, attaches buy and sell dates, and buckets each disposal into short- or long-term so the rate follows automatically. It's the mechanical 80% of the job; you just provide the files.

If the records are gone

Exchanges fold, accounts close, and 2017-era self-custody pioneers were famously lax with spreadsheets. "Zero basis because I can't prove what I paid" is the worst possible answer — some tax authorities are perfectly willing to tax the entire proceeds as gain. Do the reconstruction instead: exchange data requests, blockchain explorers tied to fiat price history, bank and card statements showing the original purchases, emails with order confirmations. It's tedious but it's evidence, and a reasonable reconstruction with supporting records beats a blank every time.

Deciding your method

If you're in the US with clean per-coin records, HIFO generally minimizes this year's bill; FIFO is the zero-friction default. In the UK and Canada, the decision is made for you — your job is getting the pool or ACB arithmetic right. In Australia and Germany, FIFO keeps things defensible, and in Germany the holding period usually dominates anyway.

Whatever your country, do two things before the year ends: export your full history while you still have exchange access, and run the numbers with the method you intend to actually defend. The calculator for your country takes proceeds and basis per disposal and gives you the tax number immediately, locally, with no sign-up — which is, after all, the easy half of the problem.

This is general information, not tax advice. US digital-asset reporting regulations are still being phased in, and specific-identification record standards continue to evolve. If your history involves many wallets, bridges or lost records, get help from a qualified crypto tax professional before filing.

← Back to Blog 📂 Batch Import (CSV) Calculate Your Tax →