Crypto average cost calculator: your average buy price per coin
Work out the average cost of your crypto for free, with several buys, sales and fees: your average buy price per coin, realised gains and unrealised gains.
Result
- Average cost
- -
- Quantity held
- -
- Amount invested
- -
- Realised gain
- -
- Current value
- -
- Unrealised gain
- -
A sale is larger than the quantity held at that point: only the quantity held is counted.
The calculation runs in your browser: nothing is sent.
Your average cost is what each unit you hold cost you on average, fees included. Add your buys and sales above: the calculator gives your average cost, your realised gain and, with the current price, your unrealised gain. The calculation runs in your browser, nothing is sent.
The average cost formula
Your average cost is the total amount of your buys, fees included, divided by the quantity bought:
Average cost = (sum of amounts bought + buying fees) ÷ quantity bought
It is also called the average buy price or weighted average cost: each buy counts in proportion to its quantity.
An example
| Operation | Quantity | Price | Fees | Cost |
|---|---|---|---|---|
| Buy | 0.5 BTC | £40,000 | £20 | £20,020 |
| Buy | 0.25 BTC | £60,000 | £15 | £15,015 |
| Total | 0.75 BTC | £35,035 |
Your average cost is £35,035 ÷ 0.75 = £46,713.33 per bitcoin. As long as bitcoin trades above that price, your position shows a gain.
What happens when you sell?
With the weighted average method, a sale does not change the average cost of the units you keep: it lowers the quantity and the amount invested in the same proportion. Your realised gain is what the sale brings in, fees deducted, minus the average cost of the units sold.
If you sell 0.25 BTC at £70,000 with £10 in fees, you receive £17,490. Those 0.25 BTC cost you 0.25 × 46,713.33 = £11,678.33. Your realised gain is £5,811.67, and the 0.5 BTC you keep still have an average cost of £46,713.33.
Average cost and tax
Tax rules on crypto gains differ from country to country. In the United Kingdom, for example, HMRC matches each disposal first with tokens bought on the same day, then with those bought in the following 30 days, and only then with your pooled tokens (the “section 104 pool”), whose cost is an average: your average cost tracks your positions, it does not replace that calculation.
Your average cost across every platform
A platform only knows the operations made on it, and does not always show your average price. CentraFIN reads your full history of fills on Kraken, Coinbase, OKX, Hyperliquid and Interactive Brokers, and works out your average cost for you, updated with every fill.
Learn more: Average cost, FIFO and France's method.
Frequently asked questions
Are fees included in the average cost?
Yes. Buying fees are added to the cost, and selling fees reduce what the sale brings in.
Does a sale change my average cost?
No. With the weighted average method, the units you keep have the same average cost; only your realised gain changes.
What is the difference between average cost and average buy price?
None: they are two names for the same measure, the average cost of one unit, fees included.
Are my numbers sent anywhere?
No. The calculation runs in your browser; nothing is sent or kept.
Your average cost, worked out for you
Connect Kraken, Coinbase, OKX, Hyperliquid or Interactive Brokers read-only: CentraFIN works out your average cost over your whole history.