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

READ4 min · UPDATED
Reviewed against primary sources cited at the bottom of this page.

Three methods. Different total tax. The IRS now requires per-wallet tracking starting in tax year 2025, which changes how cost basiscost basisWhat you originally paid for an asset. Used to calculate how much profit (or loss) you made when you sell.Full definition is calculated and what records you need to keep. This page covers the three methods, which one minimizes your tax in most years, and how to actually 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

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 (Rev. Proc. 2024-28)

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: IRS Rev. Proc. 2024-28 (effective tax year 2025) requires per-wallet cost basis tracking for digital assets.Verify at: IRS Rev. Proc. 2024-28 ↗The Revenue Procedure transitions reporting from "by-account" universal pooling to per-wallet identification.. 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, FIFO can occasionally make sense: long-held lots that get sold (and short-term lots that go to heirs with a step-up basis). But this is a niche case.

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 elect it on each sale 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, blockchainblockchainImagine a spreadsheet that tracks every Bitcoin transaction ever made, copied identically on thousands of computers worldwide. To rewrite a past entry, an attacker would have to change it on a majority of those computers at the same instant. That is mathematically impractical. That is why Bitcoin transactions cannot be undone.Full definition explorers, and any saved screenshots. If you genuinely 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-05-06. Not financial advice. Do your own research.

Subscribe via RSS for new articles.