CoinCrunch

How to calculate crypto cost basis

By Editorial team · 2026-06-14

In short: Your crypto cost basis is the total you paid to acquire a coin, including fees. To find it across multiple buys, sum (quantity × price + fee) for every purchase and divide by total quantity for a weighted average. The UK and Canada require average-cost pooling; the US allows FIFO or specific identification. Accurate cost basis is what makes your gain — and your tax — correct. This is an estimate-focused explainer, not tax advice.

Your crypto cost basis is the total amount you paid to acquire a coin, including any fees. It is the number you subtract from your sale proceeds to work out a capital gain or loss, so getting it right is the single most important step in crypto tax. When you’ve bought the same coin many times at different prices, the standard approach is a weighted average: add up the cost of every purchase (quantity × price plus fees) and divide by the total quantity you hold. Our average cost & cost-basis calculator does this for you. Everything here is general information, not tax advice.

What to include in cost basis

Cost basis is more than the headline price. Include:

Do not include fees that relate to selling (those reduce your proceeds instead) or costs unrelated to the acquisition. Including acquisition fees is not just good record-keeping — it legitimately reduces your taxable gain.

The weighted-average formula

For multiple buys, cost basis per coin is:

average cost = Σ(quantity × price + fee) ÷ Σ quantity

Worked example

BuyQuantityPriceFeeCost
10.25$40,000$20$10,020
20.25$60,000$20$15,020
Total0.50$40$25,040

Total cost basis is $25,040 for 0.5 coins, so your weighted-average cost is $25,040 ÷ 0.5 = $50,080 per coin. If you later sell 0.5 coins for $55,000, your gain is $55,000 − $25,040 = $29,960. Plug it into the profit calculator to confirm.

Cost-basis methods by country

Different tax authorities require or allow different methods, and the method changes your gain when you sell only part of a holding.

MethodWhat it meansUsed by
Average cost (pooling)All units share one weighted-average costUK (Section 104 pool), Canada (ACB)
FIFOFirst coins bought are first soldUS (default), allowed in many countries
Specific identificationYou choose which lot you soldUS (with records), Australia (per parcel)

Because the rules differ, the cost basis our calculator shows (a weighted average) matches the UK and Canadian approach directly and gives a solid baseline elsewhere. See how crypto capital gains tax works for how the gain is then taxed.

Cost basis for swaps, staking and airdrops

Keeping records

Good cost-basis tracking starts with good records. For every transaction, log the date, the coin, the quantity, the value in your local currency, and the fee. Exchanges’ CSV exports are a starting point, but they often miss on-chain transfers and DeFi activity. Consolidate everything before tax time — the average cost calculator is a quick way to turn a list of buys into the single figure you need.

How method choice changes your gain

When you sell only part of a holding, the cost-basis method you use directly changes the reported gain — and therefore your tax. Imagine you bought 1 coin at $10,000 and another at $30,000, then sold 1 coin for $40,000:

Same sale, three very different taxable gains. Where your country allows a choice (notably the US), selling your highest-cost lots first via specific identification minimises the immediate gain — though it may leave a larger gain for later. Where pooling is mandatory (UK, Canada), you don’t get to choose; the average is applied automatically. This is why knowing your country’s method isn’t academic: it can change your tax bill by thousands on the same transaction.

Cost basis when you receive crypto for free

Not all crypto is bought. If you’re paid in crypto, mine it, or receive a reward, your cost basis is generally the market value when you received it — the same figure you reported as income. That prevents double taxation: you’ve already paid income tax on that value, so only the subsequent change in price is a capital gain. Gifts are a special case in some countries, where you may inherit the giver’s cost basis. Record the receipt value carefully, because without it a later sale looks like pure profit and you’ll overpay.

Common mistakes

The errors that most often inflate a tax bill are forgetting to include acquisition fees, mixing up buy and sell fees, and resetting cost basis to zero after a wallet transfer (transfers don’t change basis). We cover more in common crypto tax mistakes.

Calculate cost basis carefully and your gains — and your tax — will be accurate and defensible. When the situation is complex (lots of DeFi, multiple methods, large sums), get a qualified professional involved; these calculators provide estimates, not advice.

Frequently asked questions

Do exchange fees count toward cost basis?

Yes. Acquisition fees (trading and network fees to buy) are added to your cost basis, which lowers your taxable gain when you sell. Always include them.

What cost-basis method should I use?

It depends on your country. The UK and Canada generally require a pooled/average-cost method. The US allows FIFO (first-in, first-out) or specific identification if you have records. Australia uses specific records per parcel.

What happens to cost basis when I swap coins?

A swap disposes of the first coin (realising a gain or loss against its cost basis) and the second coin's cost basis becomes its market value at the time of the swap.

Related articles

Last updated: 2026-06-14