Crypto Tax Gain Calculator (FIFO)
Work out the capital gain on a crypto sale using first-in-first-out cost basis across two purchase lots.
How it works
Cost basis = (units from lot 1 × price 1) + (units from lot 2 × price 2) · Gain = proceeds − cost basis
Under first-in-first-out accounting, the coins you sell are assumed to be the oldest ones you bought. FIFO matches your sale against your earliest lots first, so in a rising market it tends to surface the largest gains (and the lowest basis). Many tax authorities treat FIFO as the default method for crypto. The holding period of those earliest lots also decides whether the gain is taxed at short- or long-term rates.
Worked example
You bought 1 coin at $20,000 (lot 1) and 1 at $30,000 (lot 2), then sell 1 at $40,000. FIFO uses lot 1’s $20,000 basis, so the gain is 40,000 − 20,000 = $20,000, a 100% return on basis.
Frequently asked questions
Is FIFO the right method for my taxes?
FIFO is the default in many jurisdictions, but some allow specific-identification or other methods that can lower your bill. The best method depends on your local rules and your lots — confirm with a tax professional.
Why does FIFO often mean a bigger gain?
Because it sells your oldest coins first, and in a market that has risen over time those are usually the cheapest. A lower cost basis means a larger taxable gain compared with selling your most recent, higher-priced lots.
Does this tell me short- vs long-term tax?
No. It computes the gain amount only. Whether that gain is short- or long-term depends on how long you held the specific lots FIFO consumed, which affects the rate applied.
Related calculators
Educational estimate for crypto/DeFi mechanics — token prices are volatile and yields are not guaranteed. Not financial or tax advice.