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.
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.
Sale fees are deducted from proceeds. Rates are used only to estimate tax on the resulting gain.
| Sell | Acquired | Qty | Price | Fees | Lot basis | Basis / unit | |
|---|---|---|---|---|---|---|---|
| No lots yet - add one above or load the demo. | |||||||
| Acquired | Qty used | Basis / unit | Basis | Gain | Term |
|---|
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.
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.
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.
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.
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.
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.
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.
Scroll up to use it ↑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.
Visit Koinly →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.
Visit CoinLedger →Keeps unrealized gains and lot-level basis visible continuously rather than only at filing, which makes harvesting decisions possible before December.
Visit CoinTracker →A long-running analytics-heavy platform offering an unusually wide set of basis calculation methods and detailed reports across many jurisdictions.
Visit CoinTracking →On-chain categorization that assigns basis to staking rewards, liquidity positions, and protocol interactions where exchange-only tools tend to leave gaps.
Visit ZenLedger →