What Is Cost Basis in Crypto? How to Calculate It, With Examples

Updated

The short answer

Cost basis in crypto is the amount you paid to acquire an asset, including fees, and it is subtracted from what you sell for to find your gain or loss. To calculate it, add the purchase price and fees for each lot of coins, then match each sale to the lot you sold. For crypto you received as income, basis is its value when you received it.

Cost basis is the starting point of every crypto tax calculation. If you cannot say what you paid, you cannot say what you gained. The examples here use US rules, because that is where most searches come from; other countries use different matching methods, so check your own tax authority. State rules differ; for one example see crypto tax in Arizona. Other countries do not use cost basis the same way; see crypto tax in India. To estimate a gain from your purchase price and fees, try the crypto profit calculator.

Cost basis key facts

What it is What you paid for the asset, plus fees to acquire it
Why it matters Gain or loss = proceeds from the sale minus cost basis
If you bought with cash Price paid plus the trading fee
If you received it as income Its fair market value in your local currency on the day you received it
If you swapped one coin for another The value of the new coin when you got it, and the old coin’s sale is a taxable event
If you were gifted it In the US, generally the giver’s basis carries over to you
Where it goes Form 8949 in the US

How to calculate cost basis for crypto

  1. List every purchase as a lot. A lot is one acquisition: the date, the amount of the coin, the price you paid and the fee.
  2. Add the fees. In the US, the cost of acquiring the asset, including fees, generally forms part of basis. Fees on a sale reduce your proceeds instead.
  3. Value income at receipt. If you got crypto from staking, mining, a job or an airdrop, its value on the day you received it is both your income and your basis.
  4. Pick the lot you sold. The method you use decides which lot’s basis is subtracted.
  5. Subtract. Proceeds minus the basis of the lot sold gives the gain or loss.

Example: you buy 1 ETH for $2,000 and pay a $20 fee, so the basis is $2,000 + $20 = $2,020. You later sell it for $3,000 and pay a $15 fee, so proceeds are $3,000 - $15 = $2,985. The gain is $2,985 - $2,020 = $965.

Cost basis methods: FIFO, specific ID and others

When you hold several lots of the same coin, which one did you sell? Different methods answer differently, and the answer changes your gain.

Method How it matches Notes
FIFO (first in, first out) The oldest lot is sold first Common default in software
Specific identification You choose which lot you sold Needs records that identify each lot
Average cost or pooling Lots are merged into one average Used in some countries, such as the UK and Canada, under their own rules

Example: you buy 1 BTC for $1,000, then another for $2,000. You sell 1 BTC for $3,000. Under FIFO the basis is the first lot, so the gain is $3,000 - $1,000 = $2,000. If you identify the second lot, the gain is $3,000 - $2,000 = $1,000.

In the US, the IRS has been moving crypto toward tracking basis wallet by wallet or account by account instead of across all your holdings. Check the IRS’s digital assets page for the current rule for the year you file.

Where people get basis wrong

  • Missing history. Coins moved from an old exchange or wallet lose their purchase record unless you kept it.
  • Transfers treated as sales. Moving coins between your own wallets is not a sale, but software can misread it and show a zero-basis disposal.
  • Forgetting income. Staking and airdrop rewards have a basis too. Without it, you pay tax on the full sale value.
  • Ignoring crypto-to-crypto swaps. Each swap is a sale of one coin and a purchase of another at that day’s value.
  • Relying on a form. For 2025 US transactions, brokers report gross proceeds on Form 1099-DA but are not yet required to report cost basis (that starts for certain transactions from 2026), so a missing or $0 basis on the form is not your real basis. For self-custody and DeFi activity there may be no form at all.

Example: you receive 100 tokens worth $5 each from staking, so your income is 100 × $5 = $500 and your basis is $500. Selling them later for $700 gives a gain of $700 - $500 = $200.

What it means for you

Good records beat good software. Export your history from each exchange, keep wallet addresses, and note any transfers. Crypto tax software can rebuild basis from imported data and flag gaps; our Koinly review is one example, and the best crypto tax software list compares others. For how the numbers are taxed, see how crypto is taxed, and for the form the figures land on, the Form 8949 guide.

This page is general information, not tax advice. Rules differ by country and change by year, so check your tax authority’s current guidance or ask a qualified professional. Rules change; check with the tax authority or a tax professional.

Sources

  1. irs.gov supports: IRS guidance on digital assets: basis, gains and losses, reporting
  2. irs.gov supports: How capital gains and losses are calculated from basis and proceeds