Limited time: $9 launch price · Get the full ebook
Taxes

FIFO vs HIFO vs Specific ID: Bitcoin Cost Basis Methods Explained (2026 Per-Wallet Rules)

When you sell some Bitcoin and you bought several lots at different prices, which lots count toward your gain? The answer is your cost basis method, and the wrong choice can cost you thousands in needless taxes.

By The BitcoinHomeBase Team · Updated 2026-12-03 · 12 min read

Picture this. You have been DCAing Bitcoin for two years. Your average buy price is $48,000, but you bought some lots at $30,000 and some at $90,000. This year you sell 0.1 BTC. The IRS asks: what was the cost basis of the Bitcoin you sold? You have to pick one of those lots. Which one?

The answer is your cost basis method. It is one of the highest-leverage decisions in your Bitcoin tax situation, because the wrong choice can cost you thousands of dollars in needless capital gains tax. The right choice can legally save you the same amount.

This article is the plain-English explanation of FIFO, LIFO, HIFO, and Specific Identification — what they are, how they differ, what the IRS allows in 2026, and how to pick the right one for you. Worked examples included. None of this is tax advice; talk to a CPA before filing.

The short answer: When you sell part of your bitcoin, the IRS treats the coins you bought first as the ones you sold (FIFO), unless you identify specific coins instead. Since January 1, 2025, this works wallet by wallet: a sale on Coinbase can only use coins held in that Coinbase account. For coins held at an exchange, you have to tell the exchange which coins to sell by the time of the sale; for 2026, a standing instruction such as “highest cost first” counts. For self-custody coins, you record your choice in your own books by the time of the sale. This is general education, not tax advice.

Updated December 3, 2026. We corrected how specific identification works for exchange-held coins (including IRS Notice 2026-20, which runs through December 31, 2026), explained what your 2026 Form 1099-DA will show, removed two claims we could not source, and added an FAQ. Prices in the examples are hypothetical.

The setup: why cost basis matters

In the US, Bitcoin is taxed as property. When you sell or spend it, you owe capital gains tax on the difference between what you sold for and what you originally paid — the cost basis. If your cost basis is high, your gain is low, your tax is low. If your cost basis is low, your gain is high, your tax is high.

When you have only ever bought one lot, this is trivial: the cost basis is what you paid. When you have bought 47 lots over four years at 47 different prices, you need a method to assign one of those purchase prices to whatever you sell. Different methods produce wildly different tax bills on the same trade.

Our broader piece on Bitcoin taxes for beginners covers the basics of what gets taxed and when. This article is specifically about the lot-assignment problem.

FIFO: First In, First Out

The default. The IRS applies FIFO unless you specifically identify which units you sold. FIFO means: the first Bitcoin you bought is the first Bitcoin you sell. The oldest lot leaves first.

Worked example (hypothetical prices). You bought 0.1 BTC at $30,000 in 2023 and 0.1 BTC at $90,000 in 2025. In 2026 you sell 0.1 BTC at $100,000. Under FIFO, the lot you sold is the 2023 lot. Cost basis: $30,000. Sale price: $100,000. Capital gain: $70,000.

Two notes. First, because the 2023 lot was held more than 12 months before the 2026 sale, this is a long-term capital gain (taxed at 0%, 15%, or 20% federal depending on income), not a short-term one. Second, FIFO almost always produces the largest gain in a rising market because your oldest, cheapest coins are the ones being attributed to your sale.

LIFO: Last In, First Out

The opposite of FIFO. The most recent Bitcoin you bought is the first Bitcoin you sell. LIFO and HIFO are not separate elections you file with the IRS; they are ways of choosing coins, and they only count if you make a valid specific identification (see below). Otherwise FIFO applies.

Worked example using the same setup. 0.1 BTC bought 2023 at $30,000, 0.1 BTC bought 2025 at $90,000, sell 0.1 BTC in 2026 at $100,000. Under LIFO, the lot you sold is the 2025 lot. Cost basis: $90,000. Sale price: $100,000. Capital gain: $10,000.

That is a $60,000 lower reported gain than FIFO produced — on the exact same sale. At a 20% long-term capital gains rate, that is a $12,000 difference in tax. (Caveat: the 2025 lot might have been held less than 12 months by the time of the sale, which would make this a short-term gain, taxed at ordinary income rates — potentially higher than the long-term rate. The math gets situation-specific quickly.)

HIFO: Highest In, First Out

The tax-optimization favorite. HIFO means the lot with the highest cost basis is sold first, regardless of when you bought it.

Worked example with three lots. Bought 0.1 BTC in 2023 at $30,000, 0.1 BTC in 2024 at $60,000, 0.1 BTC in 2025 at $90,000. Sell 0.1 BTC in 2026 at $100,000. HIFO picks the $90,000 lot first. Cost basis: $90,000. Capital gain: $10,000.

HIFO will always produce the smallest gain (or largest loss) on any given sale, because by definition it picks your most expensive coins to attribute to the sale. This is why most Bitcoin investors who optimize for taxes use HIFO when they are eligible to.

Specific Identification: pick lot by lot

FIFO, LIFO, and HIFO are formulas. Specific Identification (‘SpecID’) is the manual version. You explicitly tell the IRS which specific lot you sold. Done correctly, this is the most flexible method — you can pick any lot for any sale, optimizing for gain harvesting, loss harvesting, holding period, or whatever else.

The catch: the identification has to happen by the time of the sale, not afterward, and how you do it depends on where the coins are:

Picking “the best lot” in tax software in April, after an exchange already sold FIFO, generally doesn’t work and won’t match the exchange’s report.

Most crypto tax software can track lots and model different methods, which is useful for self-custody sales and for checking your exchange’s numbers. For exchange sales, though, the choice that counts is the one the exchange had when it sold. Our piece on Bitcoin tax software in 2026 compares which tools support which methods.

What changed in 2025: the per-wallet rule

Through 2024, you could pool all of your Bitcoin across all your wallets and exchanges into one universal cost basis pool. Starting January 1, 2025, the IRS requires per-wallet (or per-account) accounting. Now each wallet and each exchange account is its own separate pool. If you sell from Coinbase, you can only choose lots that came from Coinbase. If you sell from your hardware wallet, you can only choose lots that came from your hardware wallet.

This matters because your most expensive lots may be sitting on Wallet A while your cheapest lots are on Wallet B. Under per-wallet accounting, you cannot use HIFO across the boundary. The cheapest place to sell tax-wise is now whatever account holds your most-expensive lots.

Practical implications: be deliberate about which wallet you sell from. If you have a high-cost-basis lot you want to harvest, it has to be in the wallet you sell from. Keeping clear records of which purchases sit in which wallet makes this much easier.

The 2025 switch-over. IRS Rev. Proc. 2024-28 let people who used one big pool reallocate their leftover cost basis to each wallet and account as of January 1, 2025. For most people that window has now closed (for calendar-year filers it ended no later than the extended due date of the 2025 return, October 15, 2026, or earlier if you sold first). If you never did this and you hold coins in several places, ask a tax professional how to handle it.

What your 2026 Form 1099-DA will show

For 2026 sales, exchanges send Form 1099-DA in early 2027, with a copy to the IRS. It must report cost basis only for “covered” coins: bought on that exchange in 2026 or later and kept there until you sold. For those, the exchange uses the identification you gave it, or FIFO if you gave none. For coins bought before 2026, sent in from your own wallet, or inherited, the cost box may be blank, and you supply the figure from your records. If the exchange’s acquisition dates or costs differ from your books, keep notes explaining why. More in our Form 1099-DA explainer.

Which method should you actually pick?

On any single sale, selling your highest-cost coins first produces the smallest gain (or the biggest loss). With bitcoin well below its 2025 record as of late 2026, many recent purchases are worth less than their cost, which makes the choice of coins matter even more. Three caveats:

  1. Holding period matters. Long-term gains (held over 12 months) are taxed at much lower rates than short-term gains. If HIFO would force you to sell a recent lot at short-term rates, you might prefer to sell an older long-term lot instead, even if its cost basis is lower. Our piece on tax-loss harvesting in 2026 goes deeper on this tradeoff.
  2. Your other income matters. For retirees, a gain can also affect the 0% bracket, Medicare premiums and the senior deduction. See our bitcoin tax guide for beginners.
  3. Be consistent and document it. Write down the instruction you gave each exchange and the choices you made for each self-custody sale. Good records are what make specific identification hold up.

If you plan to sell before December 31, check now which instruction your exchange has on file, and look at which coins sit in which account. Confirm the approach with a tax professional, especially if the amounts are large.

Common beginner mistakes

Frequently asked questions

What cost basis method does the IRS use by default for bitcoin? First-in, first-out (FIFO), applied within each wallet or exchange account. You can use a different order only by specifically identifying the units you sell by the time of the sale.

Can I choose HIFO on Coinbase for 2026? Only through the exchange. For 2026 sales, IRS Notice 2026-20 lets a standing instruction you give the exchange count as your identification. If you give none, the exchange uses FIFO in that account.

Do I track cost basis separately for my exchange and my hardware wallet? Yes. Since January 1, 2025, each wallet and account is its own pool. A sale uses the cost of coins held in the place you sold from.

Will my 2026 Form 1099-DA show my cost basis? Only for covered coins: bought on that exchange in 2026 or later and kept there until sold. For older, transferred-in or inherited coins, the cost box may be blank and you supply the figure.

The shortest possible summary

  1. FIFO sells your oldest, cheapest coins first — usually the highest tax bill.
  2. LIFO sells your newest coins first — sometimes lower tax, but careful with short-term holding periods.
  3. HIFO sells your most expensive coins first — almost always the lowest tax in a rising market.
  4. Specific Identification lets you manually pick — the most flexible, requires good records.
  5. Since 2025, accounting is per-wallet — you can only pick lots from the wallet you sell out of.
  6. At an exchange, your choice must be on file with the exchange by the time of the sale.
  7. Default for most beginners: HIFO via tax software, double-check with a CPA before filing.

None of this is tax advice. The numbers above will be different in your situation. The point is just to know that you have a choice, and that the default choice is usually not the cheapest one. Spending an hour with your tax software's settings can save you a four-figure check next April.