Bitcoin cost basis: FIFO, HIFO, or Specific ID.

READ4 min · UPDATED
Follow the source links and check their dates, definitions and scope.

The three cost-basis methods produce different tax totals. The IRS requires per-wallet tracking starting in tax year 2025, which changes how cost basis is calculated and what records you need to keep. Compare the methods to see which minimizes your tax in most years and how to keep the records.

This page covers personal finance fundamentals that apply regardless of your view on Bitcoin or fiat currencyfiat currencyMoney declared legal tender by a government, not backed by a physical commodity. Its value rests on trust in the issuing government.Full definition.

This page covers US federal tax law. Cost basis methods and reporting requirements differ by jurisdiction. Verify with a local tax professional outside the US.
THE SHORT VERSION

Cost basis is what you paid for the Bitcoin you sold. It determines your taxable gain. Three methods exist: FIFO (first-in, first-out), HIFO (highest-in, first-out), and Specific ID. HIFO usually minimizes current-year tax. Specific ID is the most flexible. Starting tax year 2025, the IRS requires you to track cost basis per wallet rather than across your whole portfolio. The default is FIFO if you don't choose otherwise, and the default usually costs more.

The three methods

Two lots, one wallet: which sells first
2018 lot, bought at $7,000
2024 lot, bought at $60,000
FIFO
DefaultSold firstLongest holding period, but lowest basis: largest taxable gain
Next in line
HIFO
Next in line
Sold firstHighest basis: smaller gain or a loss, usually less tax this year
Specific ID
Your picknamed at the time of sale
Your picknamed at the time of sale
HIFO is a flavor of Specific ID, so the lot must be identified by the time of each sale (a standing order with an exchange counts) and documented; otherwise FIFO applies. From tax year 2025, a sale can only use lots in the wallet it comes from.
For one 2026 sale from a wallet holding both lots, FIFO sells the $7,000 lot first for the largest gain, while HIFO sells the $60,000 lot first for a smaller gain or a loss, which usually minimizes current-year tax. Specific ID sells whichever lot you name.

FIFO (first-in, first-out)

Your oldest lot gets sold first. If you bought BTCBitcoin (BTC)The ticker symbol for Bitcoin, used on exchanges and in price quotes.Full definition in 2018 at $7,000 and added in 2024 at $60,000, a sale in 2026 uses the 2018 lot first. This usually maximizes long-term gains (longest holding period) but also maximizes the gain itself (lowest cost basis).

HIFO (highest-in, first-out)

Your highest-cost lot gets sold first. The same sale above uses the $60,000 lot first, generating a smaller gain (or even a loss). HIFO is a flavor of Specific ID where the rule is "always sell the highest-cost lot." It usually minimizes current-year tax.

Specific ID

You choose which specific lot to sell. Maximum flexibility. Lets you optimize for short-term vs long-term holding period, harvest specific losses, or hit a specific tax bracket. Requires per-lot record-keeping. The IRS requires that you identify the lot at the time of sale (not retroactively at filing).

The per-wallet rule (Treas. Reg. 1.1012-1(j))

Starting tax year 2025, the IRS requires cost basis tracking on a per-wallet basis rather than across your aggregated portfolio ×DON'T TRUST, VERIFYClaim: Final IRS regulations (Treas. Reg. 1.1012-1(j), effective January 1, 2025) require per-wallet cost basis tracking for digital assets. Rev. Proc. 2024-28 is the safe harbor for allocating existing basis to each wallet as of that date.Verify at: IRS Rev. Proc. 2024-28 ↗Section 2 of the Revenue Procedure states that the final regulations apply specific identification or FIFO to units held within a single wallet or account from January 1, 2025, replacing the "universal" multi-wallet approach.. This is a meaningful change. Before, you could pool all your Bitcoin across exchanges and self-custody and choose a method per total disposal. After, each wallet's cost basis is tracked separately.

The practical implication: when you transfer Bitcoin from Coinbase to a Ledger, the lots travel with the coins. You cannot sell from Coinbase using a basis from your Ledger lot. The IRS's view is that each wallet has its own ledger.

Most tax software (CoinTracker, Koinly, ZenLedger) updated their import logic in 2024 to handle this. If you self-track, the spreadsheet now needs a wallet column for every lot.

Which method should you use?

For most years where Bitcoin is up, HIFO or Specific ID minimizes tax. You sell the lot with the smallest gain (or biggest loss). This defers taxes to a future sale.

For years where you have a tax-loss-harvesting opportunity, Specific ID with HIFO logic lets you hand-pick lots that crystallize the largest losses. See Bitcoin tax-loss harvesting.

For estate-planning purposes, the logic points away from FIFO. Heirs get a stepped-up basis on lots held until death, whatever the holding period, so the lowest-basis lots (usually the oldest) are the ones worth keeping. FIFO sells those first. Selling higher-basis lots during life (HIFO) fits that plan better.

Default is FIFO if you do not affirmatively choose another method. Most exchanges' default reports use FIFO. If you want HIFO or Specific ID, you must identify the lot no later than each sale, either sale by sale or through a standing order with your exchange, and document the choice.

What records you actually need

For each Bitcoin lot you have ever bought:

  • Date acquired
  • Amount of BTC
  • Cost basis in USD (purchase price plus fees)
  • Wallet or exchange where it currently sits
  • For each transfer between wallets, the date and the wallet pair

For each sale, retain the trade confirmation, the spot price at time of sale, and the lot you elected to sell. The IRS expects this documentation to be contemporaneous; reconstructing it five years later from incomplete exchange exports is risky if you are audited.

Common questions

Can I switch methods year to year?

FIFO and HIFO are not technically separate "methods" once Specific ID is chosen, they're rules-of-thumb under Specific ID. As long as you document the lot identification at the time of sale, you can use whatever lot makes sense for that sale.

What if I lost records from an old exchange that shut down?

Reconstruct from bank records, email confirmations, blockchainblockchainA public transaction ledger. Bitcoin full nodes independently validate blocks and select the valid chain with the most cumulative proof of work. Reorganizations can occur; computer headcount does not determine validity.Full definition explorers, and any saved screenshots. If you cannot establish basis, the IRS may treat the basis as zero (the worst case). Going forward: keep your own records independently of the exchange.

Does the per-wallet rule mean I can't transfer between wallets without tax consequences?

Transfers between wallets you control are not taxable events. The per-wallet rule only changes how you track cost basis for the eventual sale; it does not turn transfers into taxable events.

What's the simplest workflow for someone with one exchange and a hardware wallet?

Export full transaction history from the exchange annually. Maintain a separate spreadsheet for the hardware wallet listing each lot transferred in (date, BTC amount, original cost basis from the exchange, transaction ID). Use Specific ID at sale time and document the lot. Tax software (CoinTracker, Koinly) automates this if you connect both the exchange API and the wallet address.

Does the wash sale rule affect cost basis?

No, because the wash sale rulewash sale ruleAn IRS rule preventing you from claiming a tax loss if you repurchase the same security within 30 days. Currently does not apply to Bitcoin.Full definition does not currently apply to Bitcoin. See Bitcoin and the wash sale rule for the mechanics.

Last updated 2026-09-26. Not financial advice. Do your own research.

Subscribe via RSS for new articles.