Mathproven

Crypto average cost calculator

Type each buy of one asset on its own line: the quantity, the amount paid, and the fee. Pick whether fees are added to cost or left out. The page adds the quantities and the costs and divides, giving the average cost per unit to eight decimal places, with each buy's own cost per unit beside it. Type a price per unit to compare with and it also shows what the total quantity is worth at that price and how far that is from the total cost.

What you type stays in your browser on this device. Nothing is uploaded.

Cost per unit of each buyLine 1Line 2Line 3Average times quantity gives the cost back
Each buy has its own cost per unit; the average sits between the lowest and the highest.
1. Your buys of one asset

One line per buy. Quantity takes up to 8 decimal places. Amount paid is the total for the buy in dollars, before the fee. A line left blank is skipped.

LineQuantityAmount paidFee
2. Fees and a price to compare with

Average cost

Each buy, with its cost per unit

The page divides total cost by total quantity. It does not match sales to lots: for that, the capital gains worksheet works through an export of buys and sales lot by lot. It is not a tax form and it does not say what to report.

What gets checked

Your numbersThe mathThe checksVerifiedNot verified
A result that fails a check is marked not verified. It is never shown as correct.

How it works

  1. Type the buys. One line per buy of the same asset: quantity, amount paid in dollars before the fee, and the fee. Add a line for each buy; a line left blank is skipped. Quantities take up to 8 decimal places.
  2. Pick how fees are handled. Fees are either added to cost or left out. The choice is not made for you, and the result says which was used.
  3. Read the average. Total cost divided by total quantity is the average cost per unit, rounded at the eighth decimal place. Each buy's own cost per unit is listed beside it, and the certificate shows every check.
  4. Compare with a price, and export. A price per unit can be typed to see the value of the total quantity at that price and the difference from the total cost. Download Excel or CSV, or print.

Worked example

Three made-up buys of one coin, with fees added to cost and a price of $40,000.00 per unit to compare with.

LineQuantityAmount paidFeeCostCost per unit
10.5$15,000.00$15.00$15,015.00$30,030.00
20.25$10,000.00$10.00$10,010.00$40,040.00
30.1$4,500.00$4.50$4,504.50$45,045.00

Total quantity 0.85, total paid before fees $29,500.00, total fees $29.50, total cost $29,529.50. Average cost per unit: $29,529.50 divided by 0.85 is $34,740.58823529. At $40,000.00 per unit, 0.85 is worth $34,000.00, which is $4,470.50 more than the total cost. With fees left out, the total cost is $29,500.00 and the average is $34,705.88235294.

The example uses made-up names and numbers.

Questions

Is the average cost the same as cost basis?

It is total cost divided by total quantity for the buys typed in, and nothing more. The page does not match sales to lots and does not say what figure belongs on any form. The capital gains worksheet on this site works through buys and sales lot by lot under the method you pick there.

Are fees included?

That is your choice. With fees added to cost, each buy's cost is the amount paid plus its fee. With fees left out, cost is the amount paid alone and the total of the fees is still shown.

Why eight decimal places?

A coin can be worth a fraction of a cent, so an average rounded to the cent could read as zero. Quantities are kept in whole units of 0.00000001 and a cost per unit in whole units of $0.00000001, with money in whole cents, so nothing drifts.

How is the average checked?

By multiplying it back. The average times the total quantity has to give the total cost to within half of the last decimal place, and the average has to lie between the cheapest and the dearest buy. The totals are also added a second way.

Can I mix different coins?

No. Every line is taken as a buy of the same asset. Use the page once for each asset.

Does it handle sales?

No. It works on buys only. A sale changes which lots are left, and that is lot matching, which the capital gains worksheet does.

This tool calculates and checks numbers. It is not legal, tax, or medical advice.