Crypto cost basis calculator

List your purchases, oldest first: the coins and the price per coin, including fees. Then enter the sale. This works out the gain, not the tax, and which methods you may use depends on your country.

Your answer

Gain$22,500.00
Cost basis$19,500.00
Proceeds after fees$42,000.00
Coins left0.4
  • Not tax advice. Tax rules differ by country and change over time, including which methods are allowed and how short-term and long-term gains are treated. Check your tax authority.
Gain by method
MethodCost basisGain or loss
FIFO$19,500.00$22,500.00
LIFO$28,500.00$13,500.00
HIFO$28,500.00$13,500.00
Average$24,300.00$17,700.00

Worked out in your browser. Nothing you type is sent to a server.

How we worked it out

Updated as you change the numbers.

  1. Cost basis of the coins sold: $19,500.00.
  2. Gain = sale price × coins − fees − cost basis.

Method and assumptions

FIFO sells your oldest coins first, LIFO your newest, HIFO your most expensive, and average cost uses the mean price of everything you hold.

Questions

What is the FIFO basis of 0.6 coins in the example?

$19,500: 0.5 coins at $30,000 and 0.1 at $45,000.

Sources

Method and figures checked on October 31, 2026. Every worked answer on this page is covered by an automated test. Found a mistake? Tell us.

Embed this calculator on your site

Free to use. Paste this where you want the calculator; it runs in your visitors’ browsers, sets no cookies and never sends us anything your visitors type.

Related calculators