Global ·
How to Calculate Crypto Cost Basis (2026): Methods by Country
How to calculate crypto cost basis in 2026: the US defaults to FIFO with specific ID, the UK, Canada and Japan force averaging, Germany applies FIFO per wallet.

The short answer
- In the US, from 1 January 2025 basis is tracked wallet by wallet under Treas. Reg. § 1.1012-1(j); without specific identification the units sold are deemed first in, first out.
- The UK (HMRC CRYPTO22200), Canada (ITA s. 47) and Japan leave no choice of order: cost is an average, so FIFO, LIFO and HIFO are not available.
- Germany's BMF letter of 6 March 2025 prefers unit-by-unit matching, otherwise FIFO or average cost, applied per wallet and kept until that holding is sold out.
- Japan uses the total average method unless the moving average method is elected; the choice is made per type of crypto-asset and changing it needs tax office approval.
- In our example, one 35,000 sale from lots costing 20,000, 40,000 and 27,000 produces a gain of 15,000 under FIFO, 8,000 under LIFO, 6,000 on average cost and a 5,000 loss under HIFO.
In force: Rules as in force on 10 November 2026 · US Treas. Reg. § 1.1012-1(j), Rev. Proc. 2024-28, Notices 2025-7 and 2026-20 · HMRC CRYPTO22200 (TCGA 1992 ss104–106A) · Income Tax Act (Canada) s. 47 · ATO crypto and investor guidance 2026 · BMF letter of 6 March 2025 · NTA crypto-asset FAQ
To calculate crypto cost basis, total what each lot cost in local currency including fees, then apply your country's matching rule. The US defaults to FIFO per wallet but allows specific identification, so HIFO is possible; the UK, Canada and Japan require averaging; Germany uses FIFO or average cost per wallet. One sale can swing by 20,000.
Cost basis is the least glamorous number in crypto tax and the one that decides most bills. The same sale at the same price can produce a large gain, a small one or a loss, depending only on which purchase the tax system says you sold. Below: what cost basis is, every major method, which of six countries allows which, one set of lots run through all of them, and a step list. It covers individuals holding crypto as an investment, not traders or companies.
What is crypto cost basis?
Cost basis is the amount a tax system treats as your cost for a crypto-asset, deducted from the proceeds when you dispose of it to give the gain or loss. In Canada it is called the adjusted cost base (ACB); in Australia the cost base; in the UK, allowable cost.
It is usually what you paid in local currency plus acquisition fees. Three cases catch people out:
- Swaps. Exchanging one token for another disposes of the first coin; the second coin’s cost is generally its market value at the time of the swap. See which countries tax crypto-to-crypto swaps.
- Income receipts. Staking rewards, mining or airdrops taxed as income on receipt usually take that taxed value as their cost.
- Transfers. Moving coins between your own wallets is not a disposal and does not change cost — but in the US and Germany it can change which pool the cost sits in.
A lot (or parcel) is a batch of units bought at one time for one price. Once you hold several lots of the same coin, a rule must decide which lot a sale draws from. That rule is the cost basis method.
What are FIFO, LIFO, HIFO and average cost?
There are five methods in practical use, and each answers the same question — which units did you sell? — differently.
| Method | Which units are treated as sold | Typical effect in a rising market |
|---|---|---|
| FIFO (first in, first out) | The oldest units first | Lowest cost, highest gain, but older units may qualify for long-term rates |
| LIFO (last in, first out) | The newest units first | Higher cost, smaller gain, usually short-term |
| HIFO (highest in, first out) | The most expensive units first | Highest cost, smallest gain or a loss |
| Specific identification | The exact units you name | Whatever you choose — FIFO, LIFO and HIFO are special cases |
| Average cost / pooling | No order: each unit carries the average cost of all units held | Smooths the result; no choice to optimise |
Averaging itself comes in two forms. A moving average recalculates the cost per unit after every purchase, as the UK pool and the Canadian ACB do. A total (periodic) average, used by default in Japan, takes all units held at the start of the year plus everything bought during it and divides once, so purchases made after a sale in the same year still change that sale’s cost.
Which countries allow which cost basis method?
Only the US gives individuals a free choice of lot order; the UK, Canada and Japan require an average, Germany allows a narrow menu per wallet, and Australia’s published guidance is written for shares.
| Country | Default | Choice? | Unit of account | Legal source |
|---|---|---|---|---|
| United States | FIFO | Specific identification, so LIFO or HIFO results are possible | Each wallet or broker account | Treas. Reg. § 1.1012-1(j); Notices 2025-7, 2026-20 |
| United Kingdom | Same-day, then 30-day rule, then s104 pool at average cost | None | One pool per token type, all wallets | TCGA 1992 ss104–106A; HMRC CRYPTO22200 |
| Canada | Weighted average ACB | None | All identical property you hold | ITA s. 47; CRA crypto guide |
| Australia | None prescribed for crypto | Identify units; investor guidance lists FIFO, LIFO, HIFO | Each crypto asset is a separate CGT asset | ATO crypto CGT pages; investor toolkit |
| Germany | Unit-by-unit; otherwise FIFO for the holding period | FIFO or average for cost, fixed per coin per wallet | Each wallet | § 23 EStG; BMF letter of 6 March 2025, paras 61–62 |
| Japan | Total average | Moving average by election | Each type of crypto-asset | Income Tax Act; NTA crypto FAQ |
How does the US calculate crypto cost basis?
The US uses specific identification, and where you do not identify units, FIFO applies — wallet by wallet since 1 January 2025.
Treas. Reg. § 1.1012-1(j) governs digital assets acquired or disposed of from that date. For coins in your own (unhosted) wallet, you identify units in your own books and records by the time of the sale; if you do not, the earliest units in that wallet are deemed sold. For coins held by a broker, identification must reach the broker by the time of the sale, or FIFO within that account applies. The older “universal” approach — treating all your wallets as one stack — ended on 31 December 2024.
To move to the new system, Rev. Proc. 2024-28 gave a one-off safe harbour to allocate unused basis to each wallet and account as of 1 January 2025; the allocation is irrevocable once recorded and cannot be applied to assets acquired on or after that date.
Because many platforms could not yet accept lot instructions, Notice 2025-7 let broker customers identify units — or record a standing order such as “highest cost first” — in their own records before the sale during 2025, and Notice 2026-20 extended that relief through 2026. That is how HIFO works in America: not as a legal method, but as specific identification applied consistently. From 2027, unless relief is extended again, the instruction must reach the broker. How this shows up on broker forms is covered in our Form 1099-DA guide.
Holding periods follow the lot: units held more than one year produce long-term gain, so FIFO’s higher gain may be taxed at lower rates than LIFO’s smaller one.
How does UK share pooling work for crypto?
The UK has no FIFO, LIFO or HIFO: every disposal is matched by fixed rules, and whatever remains comes out of a section 104 pool at average cost.
HMRC’s CRYPTO22200 sets the order. A disposal is matched first with the same token bought on the same day (TCGA 1992 s105), then with tokens bought in the following 30 days (s106A), and only then with the pool. Each token type has a single pool, regardless of which exchange or wallet holds the coins. Each purchase adds units and sterling cost; each disposal from the pool takes the same fraction of cost as of units.
The 30-day rule is the one that changes basis in practice: a loss sale followed by a quick rebuy is costed against the rebuy price. Our crypto tax loss harvesting guide works through that, and the UK crypto tax guide covers rates and the £3,000 allowance.
How do Canada and Australia handle crypto cost base?
Canada forces a weighted average; Australia requires you to identify the units disposed of but, for crypto, prescribes no method.
Canada: one average per coin
Section 47 of the Income Tax Act averages the cost of identical properties: each new purchase is blended into the cost of all identical units held. The CRA’s guide for cryptocurrency users describes the adjusted cost base as “usually the weighted average cost of a crypto-asset”. Coins on different platforms belong to one average. Half of the resulting gain is taxable; see our Canada crypto tax guide.
Australia: identify the asset, keep the records
The ATO’s page on how to work out and report CGT on crypto treats each crypto asset as a separate CGT asset and requires records for each. We found no ATO page prescribing FIFO, LIFO or HIFO for crypto. Its investor toolkit for shares and units names FIFO, LIFO and HIFO as the three common parcel methods and says you may use a different method for each sale if it is clear and consistent. Applying that to tokens is common practice, but it is an inference rather than crypto-specific guidance, and your records must support whichever units you claim to have sold. The 12-month mark for the 50% CGT discount runs per parcel.
How do Germany and Japan calculate crypto cost basis?
Germany works per wallet with FIFO as the fallback; Japan works per coin type with an average.
Germany: FIFO wallet by wallet
The BMF letter of 6 March 2025 prefers matching each unit individually. Where that is impossible, units bought first are treated as sold first for the one-year holding period under § 23 EStG, and for cost you may use average cost or FIFO (para. 61). The analysis runs wallet by wallet, and the method chosen for a coin in a wallet must be kept until that wallet’s holding of the coin has been sold out (para. 62).
FIFO matters more in Germany than anywhere else, because the oldest unit is the one most likely to be past one year — and a disposal of crypto held more than a year is outside § 23 altogether. See our Germany crypto tax guide.
Japan: total or moving average
The National Tax Agency’s crypto-asset FAQ gives individuals two methods: the total average method (sō-heikin-hō) and the moving average method (idō-heikin-hō). With no election filed, total average applies. The method is chosen per type of crypto-asset, by the filing deadline for the year in which that type was first acquired, and changing it later requires an application for approval by 15 March of the year of change. Gains are taxed as miscellaneous income at progressive rates.
What does the same sale look like under each method?
One sale, five methods, a 20,000 spread between best and worst.
Example (hypothetical, amounts in local currency, fees ignored, all units in one wallet): Alex buys one unit of a token on 1 February 2025 for 20,000 (lot A), one on 1 June 2025 for 40,000 (lot B) and one on 1 March 2026 for 27,000 (lot C). On 1 September 2026 Alex sells one unit for 35,000. On 1 November 2026 Alex buys one more for 37,000 (lot D).
| Method | Cost of the unit sold | Gain or loss | Where it applies | Holding period |
|---|---|---|---|---|
| FIFO | 20,000 (lot A) | +15,000 | US default; German holding period | 19 months |
| LIFO | 27,000 (lot C) | +8,000 | US via specific identification; listed in ATO investor guidance | 6 months |
| HIFO | 40,000 (lot B) | −5,000 | US via specific identification; listed in ATO investor guidance | 15 months |
| Moving average / pool / ACB | 87,000 ÷ 3 = 29,000 | +6,000 | UK s104 pool, Canada ACB, Japan moving average, German average option | — |
| Total average (Japan default) | 124,000 ÷ 4 = 31,000 | +4,000 | Japan with no election | — |
The Japanese total average differs because lot D, bought two months after the sale, enters the year’s average: opening cost of 60,000 for two units, plus 27,000 and 37,000, over four units. Nothing in the UK changes from lot D, because it falls outside the 30-day window.
What the numbers mean country by country:
- United States: HIFO turns a gain into a 5,000 long-term capital loss; FIFO gives a 15,000 long-term gain; LIFO an 8,000 short-term gain, taxed at ordinary rates. The lowest number is not automatically the lowest tax.
- United Kingdom: 6,000 gain from the pool; the pool keeps two units at 58,000, and lot D lifts it to three units at 95,000.
- Canada: 6,000 capital gain, of which 3,000 is taxable.
- Australia: if lot A is identified, the 15,000 gain is held over 12 months and qualifies for the 50% discount, giving 7,500; lot C gives 8,000 with no discount; lot B gives a 5,000 capital loss.
- Germany: the unit deemed sold for the holding period is lot A, held 19 months — so the gain is not taxable under § 23 EStG at all.
- Japan: 4,000 of miscellaneous income by default; 6,000 under a moving average election.
How do you calculate crypto cost basis step by step?
- Export every transaction from each exchange, wallet and protocol: date, time, units, price, fees and the counterparty or address.
- Value everything in local currency at the time of each transaction, using one consistent price source.
- Build lots. Each purchase, swap receipt and income receipt is a lot with a cost; add acquisition fees to it.
- Group the lots the way your country does: per wallet or account (US, Germany), per token type across all wallets (UK, Japan), or across all identical property (Canada).
- Apply the matching rule. US: your recorded identification, otherwise FIFO. UK: same-day, 30-day, then pool. Canada and Japan: the average. Germany: unit-by-unit or the method fixed for that wallet.
- Compute gain or loss: proceeds minus disposal fees minus the cost from step 5, and note the holding period of the units used.
- Carry the remaining cost forward — the reduced pool, the leftover lots — so next year starts from the right figure.
- Keep the records and settings. Germany’s tax office may ask for the CSV files and report settings; the US identification must exist before the sale, not be reconstructed afterwards.
Which crypto cost basis method is best?
Where you have a choice, the best method is the one that minimises tax over the whole holding, not on one sale — and in most countries you have no choice at all.
In the US, HIFO usually defers the most tax in a rising market, but it leaves your cheapest coins for later and can convert long-term treatment into short-term. In Germany, FIFO is often the friend of the patient holder, because it reaches one-year-old units first. In Australia, the 12-month discount argues for identifying parcels held longer than a year. In the UK, Canada and Japan, the only lever is timing: when you buy and sell changes the average, not which coins you sold.
Whatever the method, consistency and records decide whether it survives an enquiry.
Questions readers ask
How do I calculate my crypto cost basis?
Add up what each acquisition cost you in your local currency at the time, including fees: purchase price, the market value of crypto received as income, or the value of the coin you gave up in a swap. When you sell, your country's rule decides which of those costs applies: a specific lot or FIFO in the US and Germany, an average in the UK, Canada and Japan. Gain equals proceeds minus that cost.
Is HIFO allowed for crypto?
In the US, yes, in effect: HIFO is not a separate legal method, but specific identification lets you choose the highest-cost units in the same wallet or account, and Notice 2025-7 accepts a standing order recorded before the sale. The UK, Canada and Japan require averaging, so HIFO is not available there, and Germany's BMF letter offers only unit-by-unit matching, FIFO or average cost.
What happens if I don't choose a cost basis method in the US?
The default applies. Under Treas. Reg. § 1.1012-1(j), units you do not specifically identify are treated as sold first in, first out, within the wallet or account they sit in. Through 2026, Notices 2025-7 and 2026-20 also let you identify units in your own records before the sale.
Does the UK allow FIFO for crypto?
No. HMRC CRYPTO22200 applies share-pooling rules to tokens: a disposal is matched first with the same token bought that day, then with purchases in the next 30 days, and anything left comes out of the section 104 pool at average cost. Each token type has one pool across all your wallets and exchanges, so you cannot pick cheap or expensive coins.
How is crypto adjusted cost base calculated in Canada?
As a weighted average. Section 47 of the Income Tax Act averages the cost of identical properties, and the CRA's crypto guide describes your adjusted cost base as usually the weighted average cost of the crypto-asset. Each purchase adds units and cost; each sale removes a proportional share of the cost. Holding the same token on several platforms does not create separate pools.
Is crypto FIFO per wallet in Germany?
Yes. The BMF letter of 6 March 2025 prefers matching each unit individually; where that is impossible, units bought first are treated as sold first for the one-year holding period, and cost may be FIFO or average. The analysis runs wallet by wallet, and the method chosen for a coin in a wallet must be kept until that wallet's holding of the coin is sold out.
Which cost method do Japanese crypto investors use?
The total average method, unless they elect the moving average method. The National Tax Agency's crypto FAQ sets total average as the default for individuals; an election is filed per type of crypto-asset, by the filing deadline for the year in which that type was first acquired. Switching later requires an application for approval, filed by 15 March of the year of change.
Can I change my crypto cost basis method?
It depends where you are taxed. In the US you can identify different units for each sale, provided the identification is made by the time of the sale. In Germany the method chosen for a coin in a wallet must be kept until that holding is sold. In Japan a change needs tax office approval. The UK and Canada offer no choice to change.
Was this guide useful?
Thanks — your answer helps us decide what to cover next.
Sources
- Rev. Proc. 2024-28 — safe harbor for allocating unused basis of digital assets (Internal Revenue Service, PDF)
- Notice 2025-7 — temporary relief for identifying digital asset units held by a broker (Internal Revenue Service, PDF)
- Notice 2026-20 — extension of digital asset identification relief through 2026 (Internal Revenue Service, PDF)
- CRYPTO22200 — Cryptoassets for individuals: Capital Gains Tax: pooling (HMRC Cryptoassets Manual)
- Income Tax Act, section 47 — identical properties (Justice Laws, Canada)
- Guide for cryptocurrency users and tax professionals (Canada Revenue Agency)
- How to work out and report CGT on crypto (Australian Taxation Office)
- Tax time toolkit for investors — capital gains tax on the sale of shares or units (Australian Taxation Office)
- BMF letter of 6 March 2025 — Einzelfragen zur ertragsteuerrechtlichen Behandlung bestimmter Kryptowerte (Bundesministerium der Finanzen, PDF)
- 暗号資産等に関する税務上の取扱いについて(FAQ) — crypto-asset tax FAQ (National Tax Agency, Japan, PDF)
General information, not tax or legal advice. Rules change — check the official source or a licensed adviser before acting.