Crypto Cost Basis and FIFO Explained (With a Worked Example)

Cost basis is what you paid for the coins you sold, including fees. FIFO (first in, first out) is a common way to decide which coins those were. This is an educational explainer, not tax advice.

Try the free Crypto FIFO gains calculator as you read.

FIFO in one sentence

When you sell, FIFO assumes you sold the oldest coins you still hold first.

Worked example

Buy 0.5 BTC on March 1, 2024 at $40,000 ($20,000). Buy 0.3 BTC on Nov 10, 2025 at $90,000 ($27,000). Sell 0.6 BTC on June 15, 2026 at $100,000 with a $25 fee.

FIFO takes all 0.5 from the first buy (cost $20,000, held over 365 days: long-term) and 0.1 from the second ($9,000, held under 365 days: short-term). Proceeds are $60,000 - $25 = $59,975. Spreading the fee by quantity, the long-term part is about $49,979 - $20,000 = $29,979 and the short-term part about $9,996 - $9,000 = $996.

Common record-keeping trouble

Transfers between your own wallets are not sales but they must not be double-counted. Staking rewards and airdrops usually create new lots with a cost basis equal to their value when received. Rules differ by country and change, so check with a qualified tax professional.

Step by step

  1. Export every transaction Download CSVs from each exchange and note wallet transfers.
  2. Put buys, sells, rewards and transfers in one log, by date One row per event with quantity, USD price and fee.
  3. Match each sale to the oldest remaining lots That is FIFO.
  4. Split each matched lot by holding period More than 365 days is long-term in the US; check your country.
  5. Total by tax year and check with a professional Keep the log as your record.

Do it with your own numbers: the Crypto Tax & Cost-Basis Spreadsheet ($24) fIFO cost basis, short- and long-term gains, a Form 8949-style disposal report and a staking/airdrop income summary by tax year.

FAQ

Can I choose HIFO instead?

Some jurisdictions allow other methods with proper records. This guide and our spreadsheet cover FIFO only.

Is this tax advice?

No. It is general education. Ask a qualified tax professional about your situation.

Related guides

Informational tool only. Not financial, tax, or legal advice. Written by MultiverseOSP with AI assistance; examples checked by hand. Last updated October 16, 2026.