Crypto Cost Basis Calculator

Cost basis is the figure the IRS uses to decide how much capital gain or loss you have when you sell or trade a digital asset. Getting it right matters: a higher basis means a smaller taxable gain. This calculator blends two crypto purchases plus the fees you paid, then computes your total invested, total units, and average cost per unit using the average cost method. Enter a current price and it also shows the current market value and your unrealized gain or loss, so you can see your position at a glance before any sale becomes taxable.

0.00
0.00
0.00
0.00

Cost basis formula

Total invested = (units1 * price1) + (units2 * price2) + fees
Total units = units1 + units2
Average cost per unit = total invested / total units
Market value = total units * current price
Unrealized gain = market value - total invested

The average cost method blends all lots into one per-unit basis. Acquisition fees are added to invested dollars, raising basis and reducing taxable gain on a later sale.

Things to know

  • The IRS treats digital assets as property; basis determines gain or loss on disposal.
  • Average cost is one method; specific identification and FIFO can produce different results.
  • Include exchange and network fees paid to acquire the asset in your basis.
  • Crypto-to-crypto trades are taxable disposals, not just cash-out sales.
  • Keep dated records of every acquisition; brokers report some basis on Form 1099-DA.

Crypto cost basis: frequently asked questions

What is cost basis for cryptocurrency?

Cost basis is the amount you paid to acquire an asset, including purchase price and acquisition fees, expressed in US dollars. For crypto it is the dollar value of what you spent to buy each unit. The IRS uses cost basis to determine capital gain or loss when you sell, trade, or otherwise dispose of a digital asset.

How is average cost basis calculated?

Average cost basis per unit equals total dollars invested (including fees) divided by total units acquired. This calculator combines two purchases plus fees, sums the dollars spent and the units bought, then divides to find the blended per-unit cost. Average cost is one allowed method; specific identification and FIFO are others.

Should fees be included in cost basis?

Generally yes. Acquisition costs such as exchange trading fees and network fees paid to acquire the asset increase your cost basis, which reduces the taxable gain on a later sale. This tool adds your total fees to the dollars invested before computing per-unit basis. Keep records of every fee.

Does this calculate my tax?

No. This tool computes cost basis and unrealized gain at a price you enter. It does not apply short-term or long-term capital gains rates, wash-sale style rules, or your filing situation. Use IRS digital asset guidance and a tax professional to compute actual tax owed on realized gains.

What is unrealized gain?

Unrealized gain is the paper profit or loss if you held the position: current market value minus total cost basis. It becomes a realized, taxable gain or loss only when you dispose of the asset. Enter a current price per unit to see the unrealized figure for your combined holdings.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.