Crypto & Tax

Crypto Cost Basis Calculator

Enter the lots you bought, tell us how much you sold, and see the cost basis and gain under FIFO, LIFO, HIFO, and specific identification - side by side, with the exact lots each method consumes.

Add your lots
Estimate only - not tax advice. Which cost basis methods you may use, and how consistently you must apply them, is set by your tax authority - not by which number looks best. Confirm with a qualified tax professional before filing.

Add a purchase lot

Fees on a purchase are added to that lot's cost basis. Add every lot of the same asset you still held before the sale.

The disposal

Sale fees are deducted from proceeds. Rates are used only to estimate tax on the resulting gain.

Your lots

AcquiredQtyPriceFeesLot basisBasis / unit
No lots yet - add one above or load the demo.

What is cost basis in crypto?

Cost basis is what an asset cost you - the purchase price plus the fees you paid to acquire it. When you dispose of crypto, your capital gain is simply proceeds minus basis, so basis is half of every tax calculation you'll ever do. Get it wrong and every downstream number is wrong.

Why it isn't one number

If you bought once and sold everything, basis is trivial. Real portfolios aren't like that: you accumulate lots - separate purchases at different dates and prices - and then sell part of the position. Which lots did you sell? The blockchain can't tell you, because coins are fungible. A cost basis method is the accounting rule that answers the question.

The four methods

FIFO (first-in, first-out) consumes your oldest lots first. It's the most widely accepted default and tends to produce long-term treatment, since the oldest coins have been held longest. LIFO (last-in, first-out) uses the newest lots first. HIFO (highest-in, first-out) picks the most expensive lots, which usually minimizes the reported gain - but often produces short-term treatment, taxed at higher rates, so the "lowest gain" isn't automatically the lowest tax bill. Specific identification lets you nominate exact lots, which is the most flexible and generally requires records showing precisely which units were sold.

Example

You hold 1 BTC bought at $30,000, 1 at $45,000, and 1 at $52,000, then sell 1.5 BTC at $60,000. FIFO uses the cheap early coins for a $52,500 basis; HIFO reaches for the expensive ones and reports a much smaller gain. Same sale, same wallet - the difference is purely the accounting rule.

One caution: tax authorities decide which methods are permitted, how consistently you must apply them, and what documentation specific identification requires. Compare the methods to understand your range - then follow the rules that apply to you.

How to use the cost basis calculator

  1. Add every purchase lot. Date, quantity, price per unit, and acquisition fees for each buy of the asset you're selling - the calculator computes each lot's basis and basis per unit for you.
  2. Describe the disposal. Date sold, quantity, sale price, and sale fees. Sale date drives the short- vs long-term split for each lot consumed.
  3. Set your tax rates. Short-term and long-term rates so the comparison shows estimated tax, not just gain - the two can rank methods differently.
  4. Compare and inspect. Press Compare, then click any method card to see exactly which lots it consumed, their terms, and the resulting gain. Choose Spec ID to tick lots yourself.

The board shows basis, proceeds, gain, the short/long split, estimated tax, and average basis per unit - plus how wide the spread is between the cheapest and most expensive method. Export the selected method's lot schedule as CSV for your records.

Benefits of using a cost basis calculator

Top crypto cost basis calculators

This page is built for a single disposal you can reason about by hand. Once you have hundreds of lots spread across exchanges and wallets, cost basis becomes a data problem - these platforms reconstruct it automatically and produce filing-ready reports.

YOU'RE HERE

This calculator

Best for: understanding the methods

FIFO, LIFO, HIFO, and specific identification compared on the same sale, showing exactly which lots each method consumes and how the spread affects gain and estimated tax.

MethodsAll four, side by side
DataStays on device
PriceFree
Scroll up to use it ↑

Koinly

Best for: multi-country basis rules

Tracks cost basis across 800+ exchanges, wallets, and chains, and applies the basis rules of the country you file in - useful where local law restricts which methods you may use.

MethodsVaries by country
ImportAPI, wallet, CSV
Paid from~$49 / tax year
Visit Koinly →

CoinLedger

Best for: fixing missing basis

Strong error reconciliation for transfers between your own wallets - the single most common cause of broken cost basis - with a short path from import to Form 8949.

MethodsFIFO, LIFO, HIFO
Import400+ integrations
Paid from~$49 / tax year
Visit CoinLedger →

CoinTracker

Best for: year-round basis tracking

Keeps unrealized gains and lot-level basis visible continuously rather than only at filing, which makes harvesting decisions possible before December.

MethodsFIFO, LIFO, HIFO
Free tierPortfolio tracking
Paid from~$59
Visit CoinTracker →

CoinTracking

Best for: method experimentation

A long-running analytics-heavy platform offering an unusually wide set of basis calculation methods and detailed reports across many jurisdictions.

MethodsWide selection
Reports100+ countries
Paid from~$49 / year
Visit CoinTracking →

ZenLedger

Best for: DeFi and staking basis

On-chain categorization that assigns basis to staking rewards, liquidity positions, and protocol interactions where exchange-only tools tend to leave gaps.

MethodsFIFO, LIFO, HIFO
FocusDeFi, staking, NFTs
Paid from~$49 / tax year
Visit ZenLedger →