Gold 24K$78.5/gram0.51%
Gold 22K$72/gram0.51%
Gold (per oz)$2,4390.51%
Silver$0.9200/gram1.10%
USD/PKR278.50.29%
EUR/PKR305.220.38%
SAR/PKR74.270.28%
AED/PKR75.850.24%
GBP/PKR356.40.59%
Bitcoin$63,2502.00%
Ethereum$3,1211.43%
BNB$582.31.42%
Solana$145.62.26%
XRP$0.58202.11%
Cardano$0.38502.04%
Dogecoin$0.10354.02%
Gold 24K$78.5/gram0.51%
Gold 22K$72/gram0.51%
Gold (per oz)$2,4390.51%
Silver$0.9200/gram1.10%
USD/PKR278.50.29%
EUR/PKR305.220.38%
SAR/PKR74.270.28%
AED/PKR75.850.24%
GBP/PKR356.40.59%
Bitcoin$63,2502.00%
Ethereum$3,1211.43%
BNB$582.31.42%
Solana$145.62.26%
XRP$0.58202.11%
Cardano$0.38502.04%
Dogecoin$0.10354.02%
Back to Blog
Crypto

Crypto Tax Calculator: FIFO vs LIFO vs HIFO Explained

See how FIFO, LIFO, and HIFO change your crypto tax bill, with a real worked example and how the UK and Canada handle cost basis differently.

Usman RazaSeptember 29, 20268 min read
Crypto Tax Calculator: FIFO vs LIFO vs HIFO Explained

Sell the exact same 0.5 BTC, at the exact same price, and two people can end up with completely different tax bills. The difference isn't the trade, it's which of their earlier purchases the crypto tax calculator treats as the one being sold. That choice is called a cost basis method, and it matters more than most people realize until they see the numbers side by side.

Why Your Crypto Tax Calculator Needs a Cost Basis Method

If you bought Bitcoin once and sold it once, there's nothing to decide. Your gain is simply what you sold for minus what you paid.

Most people don't buy just once, though. You might buy a bit in March, more in November, and more again next June, each time at a different price. When you later sell only part of what you're holding, you need a rule for which of those earlier purchases counts as the coins you just sold. That rule is your cost basis method, and it directly determines your reported gain.

The Three Main Methods: FIFO, LIFO, HIFO

FIFO, or First In, First Out, is the simplest to picture. Whatever you bought earliest gets treated as whatever you sold first. It's also the US default when you haven't specifically identified otherwise, which is exactly why most people end up using it without ever deciding to.

Flip that order around and you get LIFO, Last In, First Out, where your most recent purchases are the ones counted as sold.

Then there's HIFO, Highest In, First Out. Instead of caring about timing at all, it just grabs whichever units cost you the most, wherever they happen to sit in your purchase history. Since a higher cost basis means a smaller gap between what you paid and what you sold for, this method tends to produce the smallest taxable gain of the three.

In the US, LIFO and HIFO aren't separate official methods on their own. They're strategies carried out through something called Specific Identification, which requires you to identify the exact units you're selling at the time of the trade and keep documentation, including the purchase date, price, and quantity for each lot. Without that documentation, FIFO applies automatically.

A Real Worked Example: Same Trade, Three Different Tax Bills

Here's a single sale, calculated three different ways. Say you're holding Bitcoin bought in three separate lots:

  • Lot A: 0.4 BTC bought March 2024 at $35,000 per coin (cost: $14,000)
  • Lot B: 0.3 BTC bought November 2024 at $72,000 per coin (cost: $21,600)
  • Lot C: 0.3 BTC bought June 2026 at $58,000 per coin (cost: $17,400)

In September 2026, you sell 0.5 BTC at $90,000 per coin, for proceeds of $45,000.

MethodLots UsedCost BasisTaxable Gain
FIFO0.4 BTC (Lot A) + 0.1 BTC (Lot B)$21,200$23,800
LIFO0.3 BTC (Lot C) + 0.2 BTC (Lot B)$31,800$13,200
HIFO0.3 BTC (Lot B) + 0.2 BTC (Lot C)$33,200$11,800

Same trade, same sale price, and the reported gain ranges from $11,800 to $23,800 depending purely on which lots the calculator treats as sold.

Holding period adds another layer. Lot A and Lot B were both bought more than a year before the September 2026 sale, so they qualify for long-term treatment. Lot C was bought in June 2026, only a few months earlier, so it's short-term. Under FIFO, the entire gain here is long-term. Under LIFO and HIFO, part of the gain comes from the short-term Lot C, so you'd be splitting that $13,200 or $11,800 gain across both short-term and long-term portions rather than reporting one clean number, which affects which tax rate applies to each piece.

For the formula behind a single, straightforward trade without multiple lots, our guide on calculating your crypto tax bill in under a minute covers that case.

Not Every Country Lets You Choose

This entire FIFO versus LIFO versus HIFO decision assumes you're somewhere that lets you pick a method. Several major markets don't.

United Kingdom: HMRC requires a completely different system called Section 104 pooling. All your identical crypto holdings get averaged into one pool, and any disposal uses that average cost, not any specific lot's price. Two additional rules apply first: the same-day rule (purchases and disposals on the same day are matched together) and the 30-day rule (a disposal is matched against anything bought back within 30 days, before falling into the general pool). There's no FIFO, LIFO, or HIFO choice at all.

Canada: The CRA requires Adjusted Cost Base (ACB), which works similarly to the UK's pooling. Every purchase updates a running average cost for that entire crypto holding, and every disposal uses that average, recalculated at the time of sale.

If you're in the US, Australia, or India, the FIFO/LIFO/HIFO comparison above genuinely applies to your situation. If you're in the UK or Canada, the question of which method is "best" doesn't really come up, since the averaging approach is mandatory rather than elective.

Common Mistakes

Switching methods without documentation. In jurisdictions where Specific Identification is allowed, you generally need to identify your method and keep records at the time of each trade, not retroactively decide which method gives the best result after the fact.

Assuming HIFO is automatically the smartest choice. HIFO minimizes your current reported gain, but as the example above shows, it can also pull more of that gain into short-term territory, which in the US is taxed at higher ordinary income rates than long-term gains. The lowest gain isn't always the lowest tax bill once holding period is factored in.

Forgetting the UK's same-day and 30-day rules. Selling at a loss and buying back the same coin shortly after doesn't work the way it might elsewhere, since these matching rules specifically exist to prevent that.

Not tracking each lot's individual holding period. Once you're splitting a sale across multiple lots, you need the acquisition date for each one, not just an overall average, to correctly separate short-term from long-term gains.

Frequently Asked Questions

Can I switch between FIFO and HIFO from year to year?

Where Specific Identification is permitted, you can generally choose your method per transaction, provided you have the required documentation at the time of the trade. Retroactively reassigning a method after the fact is generally not accepted.

Does a simple crypto tax calculator handle multiple cost basis methods automatically?

A calculator built for single-trade estimates, like ours, works from the purchase price, sale price, and quantity you enter for one specific lot. If you're choosing between methods across multiple lots, you'd calculate each method's version separately, using the relevant lot's actual purchase details, and compare the results.

Is HIFO always the best method to minimize tax?

Not always. It minimizes the reported gain in the current year, but if that means recognizing more short-term gain instead of long-term gain, the actual tax owed can end up higher than a method that reports a larger, but fully long-term, gain.

What records do I need to use Specific Identification?

Generally the acquisition date, cost, and quantity for each lot, along with the date and sale price when disposed of, tracked clearly enough to show which specific units were sold in each transaction.

Running Your Own Numbers

The method behind your crypto tax calculator changes the answer as much as the trade itself does. Once you know which lots you're selling, whether by choice or because your country requires a specific method, the Crypto Tax Calculator will work out the gross profit, fees, tax owed, and after-tax result for that lot. For a broader look at country-by-country rates once you've settled on your gain, our Free Crypto Tax Calculator guide covers that comparison.

This article provides general educational information and isn't personalized tax advice. Cost basis rules vary by country and can change, so confirm current requirements with a qualified tax professional before choosing a method or filing.

Crypto Tax Calculator
Cost Basis
FIFO
HIFO
Bitcoin

Crypto Tax Calculator

Put what you just read into practice — calculate your own numbers in seconds.

Open Calculator