When you sell crypto, you need to calculate your cost basis — what you originally paid. The method you choose can significantly affect your tax bill.
What Is Cost Basis?
Cost basis is the original value of an asset for tax purposes. When you sell:
Capital gain = Proceeds - Cost basis
A higher cost basis = lower gain = less tax.
The Four Main Methods
FIFO (First In, First Out)
You sell the oldest coins first.
| Transaction | Action | Price |
|---|---|---|
| Jan 2025 | Buy 1 BTC | $30,000 |
| Jun 2025 | Buy 1 BTC | $50,000 |
| Jul 2026 | Sell 1 BTC | $80,000 |
FIFO result: You sell the Jan 2025 BTC. Gain = $80,000 - $30,000 = $50,000.
LIFO (Last In, First Out)
You sell the newest coins first.
LIFO result: You sell the Jun 2025 BTC. Gain = $80,000 - $50,000 = $30,000.
HIFO (Highest In, First Out)
You sell the coins with the highest cost basis first.
If you bought BTC at various prices, HIFO selects the most expensive purchase. This minimises your gain (and tax).
Specific Identification
You choose exactly which coins to sell. This gives you the most control but requires the best record keeping.
Comparison Example
| Method | Cost Basis Used | Gain | Tax (at 20%) |
|---|---|---|---|
| FIFO | $30,000 | $50,000 | $10,000 |
| LIFO | $50,000 | $30,000 | $6,000 |
| HIFO | $50,000 | $30,000 | $6,000 |
| Specific ID | You choose | Variable | Variable |
In this example, FIFO produces the highest tax. LIFO and HIFO produce the lowest.
Which Method Is Best?
| If you expect… | Use… | Reason |
|---|---|---|
| Prices to rise long-term | HIFO | Minimise gains now |
| Prices to fall | LIFO | Capture losses now |
| Simple record keeping | FIFO | Easiest to track |
| Maximum control | Specific ID | Choose optimal lots |
Country Restrictions
Not all methods are available in all countries:
| Country | Allowed Methods |
|---|---|
| US | FIFO, LIFO, HIFO, Specific ID |
| UK | Section 104 pooling (average cost basis) |
| Canada | Adjusted cost base (average) |
| Australia | FIFO (default) |
| Germany | FIFO |
| France | Proportionate method |
| Japan | Moving average (総平均法) |
Impact of Frequent Trading
Every trade creates a new “lot” that must be tracked. If you trade frequently, you’ll have hundreds or thousands of lots.
Without good software, this becomes unmanageable. Use crypto tax software that supports your chosen method.
Same-Day and Bed-and-Breakfast Rules
Some countries have anti-avoidance rules:
- UK: Same-day rule (same-day trades matched first) and 30-day bed-and-breakfast rule
- US: Wash sale rules (not yet applied to crypto, but proposed)
- Australia: Same-day trading matched first
How to Choose
- Check your country’s allowed methods first
- Start with FIFO if you’re new — it’s simple and universally accepted
- Switch to HIFO if you have large gains and want to minimise tax
- Use Specific ID only if you have excellent record keeping and tax software
Record Keeping for Cost Basis
You need to track for each transaction:
- Date and time
- Asset type
- Amount
- Price in your local currency
- Exchange or platform
- Transaction ID (hash)
- Wallet address (sender and receiver)
Choosing in practice
For most people, the decision between methods comes down to how much record-keeping they can sustain. FIFO is the default in most countries precisely because its logic is intuitive — the first coin bought is the first coin sold — and it is universally accepted by tax authorities. If you are new to crypto or holding a modest number of positions, FIFO keeps your accounting simple and your audit risk low.
If you are sitting on large gains and want to reduce your immediate tax bill, HIFO is often the better choice, provided your country allows it. Selling your most expensive lots first lowers the gain you must report today. The trade-off is that it deliberately defers appreciation into your cheaper lots, which may crystallise larger gains later. That can be a sensible strategy in a rising market, but it assumes you will remain in a position to absorb those future taxes.
LIFO sits between the two. It tends to produce a lower gain than FIFO in rising markets, but it can create unusual tax results if prices fall sharply. Specific identification offers the most precise control of all, but it demands careful lot-level records and is impractical for anyone trading actively without dedicated software.
Whichever method you land on, the single most durable advice is to pick one and stay consistent. Switching methods between years, or cherry-picking lots without documentation, is a classic audit trigger. Locking in a method, keeping clean lot-level records, and reviewing the figures with crypto tax software before you file are the practical steps that keep your cost-basis calculation accurate and defensible.
Bottom Line
Your cost basis method has a massive impact on your crypto tax bill. HIFO and LIFO generally produce the smallest gains in rising markets. But not all methods are available everywhere — check your local rules. Use specialised crypto tax software to track lots accurately and run scenarios with different methods before filing.