When you sell part of your crypto, the tax calculation needs an answer to a simple-sounding question: which coins did you sell? If you bought at different prices, the answer changes the gain. FIFO, LIFO, HIFO and average cost are four ways of answering it. This guide runs one set of trades through all four, then explains which method the tax authorities in the US, UK, Canada, Australia and Germany actually let individuals use. In most of them the choice is narrower than people expect.
What cost basis is, and why the method matters
Your gain on a sale is what you received minus what the units cost you. That cost is called the cost basis in the US, the allowable cost in the UK, the adjusted cost base in Canada and the cost base in Australia. The words differ; the idea is the same.
The trouble is that units of the same coin are interchangeable. If you bought one bitcoin in January and another in March, then sold one in June, nothing on the blockchain says which one left. Some systems let you identify the units. Others impose a rule. Either way, a cost has to be attached to the sale, and different methods attach different costs.
Fees usually form part of the cost or reduce the proceeds. The exact treatment is set by each country’s rules, and the calculator applies it for you.
The four methods in plain terms
- FIFO (first in, first out). The oldest units you still hold are treated as sold first.
- LIFO (last in, first out). The most recently acquired units are treated as sold first.
- HIFO (highest in, first out). The units with the highest cost are treated as sold first.
- Average cost. All units of the asset share one average cost: total cost divided by total units. A sale takes that average cost per unit. In the UK this pool is called the Section 104 pool; in Canada it is the adjusted cost base of identical properties.
LIFO and HIFO are not separate methods in US tax law. They are only available as forms of specific identification, which has its own conditions (covered below).
One set of trades, four answers
This is the same example we use to test the calculator. The figures are deliberately small so you can check them by hand.
Worked example: three buys and one sale
You buy 1 unit for 100, then 1 unit for 300, then 1 unit for 200, in that order. Later you sell 1 unit for 250. The amounts are in any currency and no fees are involved.
- FIFO: the first unit (cost 100) is sold. Gain 250 − 100 = +150.
- LIFO: the last unit (cost 200) is sold. Gain 250 − 200 = +50.
- HIFO: the dearest unit (cost 300) is sold. Gain 250 − 300 = −50, a loss.
- Average cost: total cost 100 + 300 + 200 = 600 over 3 units is 200 each. Gain 250 − 200 = +50.
| Method | Unit treated as sold | Cost used | Gain or loss | Cost left in the 2 units you still hold |
|---|---|---|---|---|
| FIFO | First (bought at 100) | 100 | +150 | 500 |
| LIFO | Last (bought at 200) | 200 | +50 | 400 |
| HIFO | Dearest (bought at 300) | 300 | −50 | 300 |
| Average cost | An average unit | 200 | +50 | 400 |
The same sale gives a gain of 150, a gain of 50 or a loss of 50, depending only on the method. You can try a single sale like this in the crypto capital gains calculator.
The method changes timing, not the lifetime total
Look at the last column. Whatever cost a method doesn’t use now stays with the units you still hold. Suppose you later sell the other two units for 250 each. Your total proceeds are 750 and your total cost is 600 under every method, so the lifetime gain is 150 in every case. FIFO reports it all now. HIFO reports a loss now and a gain of 200 later.
Shifting gains between years can still change your tax bill: rates, allowances and holding-period rules differ from year to year and person to person. That is why tax authorities regulate the method instead of leaving it open.
Holding periods add a second effect. In the US, a gain on an asset held for more than one year is long-term, and one held for one year or less is short-term (IRS Topic 409). Selling older units first can therefore change both the amount of the gain and how it is taxed.
What each country allows individuals to use
| Country | Rule for individuals | The example above |
|---|---|---|
| United States | FIFO unless you specifically identify the units sold; per wallet or account from 2025 | +150 (FIFO); other results only with valid specific identification |
| United Kingdom | Same-day rule, then 30-day rule, then the Section 104 pool at average cost; no free choice | +50 if the sale isn’t matched by the same-day or 30-day rules |
| Canada | Average cost of identical properties | +50 |
| Australia | You must be able to identify which units you disposed of; see below (check ato.gov.au) | Depends on how you identify the units |
| Germany | Identify individual units if possible; otherwise FIFO for the holding period with average cost for the value, or FIFO for both as a simplification; per wallet | +50 (average) or +150 (FIFO) |
United States
If you don’t identify specific units, the IRS treats them as disposed of in chronological order, beginning with the earliest unit (IRS virtual currency FAQs, Q41). You may choose which units you sold if you can specifically identify them and substantiate your basis in them (Q39). Q40 sets out what adequate identification means: either the unit’s unique digital identifier, or records showing each unit’s acquisition date, basis and value and the details of its disposal.
From 1 January 2025, these rules apply within each wallet or account, not across all your holdings. Rev. Proc. 2024-28 explains the change and gives a safe harbour for allocating your remaining basis to each wallet. It describes separate identification rules for units in a wallet you control and for units held in the custody of a broker. It also refers to identification by a standing order or instruction, either given to your broker or recorded in your books and records. A HIFO choice in the US crypto tax calculator is therefore a form of standing specific identification. It is valid only if you actually made that identification in the way the rules require; if you didn’t, FIFO applies. The calculator shows this caveat whenever you choose HIFO.
United Kingdom
HMRC requires a fixed order. Tokens bought and sold on the same day are matched first. Then a disposal is matched with tokens of the same type bought in the following 30 days. Anything left comes from the Section 104 pool, which holds all your tokens of that type at their average cost (HMRC CRYPTO22200). FIFO, LIFO and HIFO play no part. In the example, if all three purchases were on earlier days and you bought nothing in the 30 days after the sale, the pool cost is 200 per unit and the gain is 50. Our guide to the same-day, 30-day and Section 104 rules covers the order in detail.
Canada
The CRA describes the adjusted cost base of a crypto-asset as usually its weighted average cost (CRA: reporting your capital gains as a crypto-asset user). Under the rules for identical properties, you work out the average cost of each property in the group at the time of each purchase (CRA: special rules and other transactions). The average is across all your units of that asset, wherever they are held. The Canada crypto tax calculator doesn’t split it by wallet.
Australia
The ATO treats each crypto asset as a separate CGT asset and expects you to keep records of each one and every transaction (ATO: keeping crypto records; check ato.gov.au, because the site blocked our automated reading and we relied on search results). For shares, the ATO’s ruling TR 96/4 says that where shares can’t be identified, FIFO is used (TR 96/4). We couldn’t confirm an ATO statement applying that ruling to crypto, so treat FIFO for crypto in Australia as a common approach, not a confirmed rule. The calculator uses FIFO by default and offers specific identification as an option.
Germany
The BMF letter of 6 March 2025 starts from individual identification (margin number 61). Where that isn’t possible, the earliest units of a token are treated as sold first for the one-year holding period, and the value is worked out by the average cost method. As a simplification, FIFO may also be used for the value. Margin number 62 adds that the approach applies per wallet, and the method chosen for a token in a wallet must be kept until all units of that token in the wallet have been sold (BMF letter, 6 March 2025). LIFO and HIFO aren’t among the options it describes.
Why generic mode exists, and its limits
CryptoTaxOwl models five countries. Plenty of people live elsewhere, and accountants often want a clean, neutral ledger built from a client’s raw exchange files. Generic mode in the crypto tax calculator serves both. You choose:
- a base currency;
- the date your tax year starts;
- a method: FIFO, LIFO, HIFO or average cost;
- whether to calculate across all accounts or per wallet;
- an optional long-term threshold in months, and how rewards are treated.
It then applies that method consistently and shows which units were matched to each sale.
What generic mode doesn’t do. It doesn’t know your country’s rules. It applies no same-day or 30-day matching, no Canadian superficial-loss rule, no Australian discount and no allowance or threshold. A banner on every page of the report says these are standard cost basis calculations, not your country’s tax rules. Check with your tax authority, or speak to a qualified adviser if you’re unsure.
Before you pick a method
- Check whether you have a choice at all. In the UK and Canada you don’t. In Germany the choice is narrow and has to be kept per wallet. In the US anything other than FIFO depends on identification you can back up.
- Be consistent. Switching methods year by year to minimise each year’s gain is exactly what the identification and consistency rules are meant to stop.
- Get your transfers right first. A method can only be applied to lots the report knows about. Unmatched transfers distort every method; see our guide to transfers between your own wallets.
- Keep the report. Every CryptoTaxOwl report records the method used and the rule behind each match, so you can show your working later.
Sources
- Frequently asked questions on virtual currency transactions (Internal Revenue Service), retrieved 7 October 2026
- Rev. Proc. 2024-28: Guidance for taxpayers to allocate basis in digital assets to wallets or accounts as of January 1, 2025 (Internal Revenue Service), retrieved 7 October 2026
- Topic no. 409, Capital gains and losses (Internal Revenue Service), retrieved 7 October 2026
- CRYPTO22200 – Cryptoassets for individuals: Capital Gains Tax: pooling (HMRC), retrieved 7 October 2026
- Reporting your capital gains as a crypto-asset user (Canada Revenue Agency), retrieved 7 October 2026
- Special rules and other transactions (Canada Revenue Agency), retrieved 7 October 2026
- Keeping crypto records (Australian Taxation Office), retrieved 7 October 2026
- TR 96/4 (Australian Taxation Office), retrieved 7 October 2026
- Einzelfragen zur ertragsteuerrechtlichen Behandlung bestimmter Kryptowerte (Bundesministerium der Finanzen, letter of 6 March 2025), retrieved 7 October 2026
Frequently asked questions
Which cost basis method gives the lowest tax?
In a single year, the method that matches your sales to the most expensive units, usually HIFO, often shows the smallest gain. But it leaves cheaper units behind, so later sales show larger gains. More importantly, you can’t simply pick a method: the US, UK, Canada, Australia and Germany each set their own rules, summarised in the table above.
Can I use HIFO in the US?
Only as a form of specific identification. The IRS allows you to choose which units you sold if you can specifically identify them and substantiate their basis; otherwise first-in, first-out applies. From 2025 that identification works wallet by wallet. The US crypto tax calculator offers HIFO with a caveat about these requirements.
Can I use FIFO in the UK?
No. HMRC requires the same-day rule, then the 30-day rule, then the Section 104 pool at average cost. There is no free choice of method. Our Section 104 guide walks through HMRC’s own examples.
Does Canada use FIFO for crypto?
No. The CRA describes the adjusted cost base of a crypto-asset as usually its weighted average cost, and the rules for identical properties average the cost across all units you hold. The Canada crypto tax calculator pools across all your accounts.
Can I switch methods from one year to the next?
It depends on the country. Germany’s BMF letter says the method chosen for a wallet must be kept until all units of that token in the wallet have been sold. In the US, any identification must meet the IRS requirements at the time of each sale. If you’re considering a change, speak to a qualified adviser first.
Why does generic mode offer all four methods?
Generic mode is for people whose country we don’t model, or who need a neutral ledger for an accountant. It does the arithmetic of each method correctly but doesn’t know your country’s rules, which is why it carries a permanent banner saying so.
This guide explains the rules in general terms. It isn’t tax advice. Spotted something out of date? Email errors@cryptotaxowl.com and we’ll check it against the source.