★ MONEY · CRYPTO · GUIDE

How to Calculate Capital Gains Tax on Crypto: A Guide

On 2.5 coins bought at $40,000 and sold at $90,000 you owe $18,893.00 of tax — and keep $206,107.00. This guide works through the five steps — the gain, the bands, the NIIT, the state tax, and the total — with every number checked against the calculator.

What capital gains tax on crypto is

Selling coins for more than you paid creates a capital gain. Held more than a year, it is long-term and taxed at 0%, 15% or 20%; held a year or less, it is short-term and taxed like wages. Crypto is taxed like stocks — same bands and rates — except the wash-sale rule does NOT currently apply to crypto, so you can sell at a loss and buy the coin back right away. Five steps: the gain, the bands, the NIIT, the state tax, and the total.

Step 1: Work out the gain, minus the fees

The gain is coins times the sell-minus-buy difference, minus the fees. On 2.5 coins bought at $40,000 and sold at $90,000, with $250 of fees, the gain is $124,750.00: 2.5 times $50,000 is $125,000, minus $250 of fees. At $40,000 the gain is -$250.00, a loss of exactly the fees. At $30,000 it is -$25,250.00, and there is no tax at all.

Step 2: Put the gain through the bands

The 2026 long-term rates are 0%, 15% and 20% (IRS Revenue Procedure 2025-32), and the gain stacks on your other taxable income. Single: 0% through $49,450.00, 15% through $545,500.00; married filing jointly: $98,900.00 and $613,700.00. With $80,000.00 of other income the 0% band is full, so the whole $124,750.00 falls in the 15% band: the tax is $18,712.50. With $30,000.00 of other income, $19,450.00 of 0% room is left, so the tax is $15,795.00. Married filing jointly, the tax is $15,877.50. With $545,500.00 of other income the whole gain is in the 20% band and the tax is $24,950.00.

Step 3: Short-term is taxed like wages

Sell within a year and the gain is short-term, taxed at the ordinary rates: single 10% to $12,400.00, 12% to $50,400.00, 22% to $105,700.00, 24% to $201,775.00, 32% to $256,225.00, 35% to $640,600.00, 37% above. On the same $124,750.00 gain, the short-term tax is $29,664.00 — $10,951.50 more than the $18,712.50 long-term tax — because $25,700.00 falls in the 22% band ($5,654.00), $96,075.00 in the 24% band ($23,058.00) and $2,975.00 in the 32% band ($952.00). With $100,000.00 of other income and a $120,000.00 sell price, the total tax is $60,760.25.

Step 4: Add the 3.8% NIIT when it applies

The net investment income tax adds 3.8% on the gain once your MAGI — other income plus the gain — passes $200,000.00 single ($250,000.00 married filing jointly). On the defaults, MAGI is $204,750.00, $4,750.00 over the threshold, so the NIIT is $180.50. At $400,000.00 a coin it is $29,630.50; with $545,500.00 of other income it is $4,740.50.

Step 5: Add state tax and work out what you keep

State tax is the gain times your state rate: at 5% it adds $6,237.50, so the total tax is $25,130.50. The total is federal tax plus NIIT plus state tax: $18,712.50 + $180.50 + $0.00 = $18,893.00. The effective rate is 15.14% and the after-tax proceeds are $206,107.00.

The worked example

Single filer, 2.5 coins, $40,000 buy, $90,000 sell, $250 fees, long-term, $80,000 other income, 0% state rate. The gain is $124,750.00; the 0% band is full, so the whole gain falls in the 15% band and the tax is $18,712.50; MAGI is $204,750.00, so the NIIT is $180.50; the total tax is $18,893.00 and the after-tax proceeds are $206,107.00. Rounding convention: totals are computed from unrounded values, so rounded parts may differ by a cent from their rounded sum.

Working backwards

The sell price for $20,000.00 of tax is $92,355.32 (exact 92355.3191); at $92,355.32 the tax is $20,000.00, at $92,354.32 it is $19,999.53. The coins for $10,000.00 of tax are 1.3383 (exact 1.3383333); at 1.3383 coins the tax is $9,999.75, at 1.3384 coins it is $10,000.50. The buy price for $0.00 tax is $89,900.00; at that buy price the tax is $0.00, at $89,899 it is $0.38. The sell price for $50,000.00 of tax is $156,185.11 (exact 156185.1064); at $156,185.11 the tax is $50,000.00, at $156,184.11 it is $49,999.53. The state rate for $25,130.50 total is 5.00%; at that rate the total tax is $25,130.50. The sell price for $0.00 tax is $40,100.00; at that sell price the tax is $0.00, at $40,101 it is $0.38.

What changes the answer most

Sell price moves the answer most: $40,000 gives $0.00 tax; $90,000 gives $18,893.00; $150,000 gives $47,093.00; $400,000 gives $186,305.50, with $434,250.00 taxed at 20% and $29,630.50 of NIIT. Holding period is second: $18,893.00 long-term, $29,844.50 short-term. Other income is third: $30,000.00 gives $15,795.00; $545,500.00 gives $29,690.50.

Losses and the $3,000 limit

A loss is not taxed, and it can cut the tax on other gains — up to $3,000.00 a year against ordinary income, the rest carried forward. At a $30,000.00 sell price the loss is $25,250.00, so $3,000.00 is deductible this year and $22,250.00 carries forward. At $40,000.00 the loss is $250.00, inside the limit. At $0.00 the loss is $100,250.00: $3,000.00 this year, $97,250.00 carried forward.

Crypto versus stocks: the wash-sale difference

Crypto and stocks are taxed the same way — same bands, rates, NIIT and $3,000-a-year loss limit. The difference is the wash-sale rule: for stocks, selling at a loss and buying back within 30 days disallows the loss. For crypto, the wash-sale rule does NOT currently apply, so you can sell at a loss, claim it, and buy the coin back right away — but the rule could change, and the loss still has to be real.

What not to do

Do not sell just before the one-year mark if you can wait: the same $124,750.00 gain costs $29,844.50 short-term and $18,893.00 long-term. Do not forget the NIIT: at $400,000.00 a coin it adds $29,630.50 on top of the $156,675.00 federal tax. Do not sell in a high-income year if you can wait: $30,000.00 of other income instead of $80,000.00 cuts the tax to $15,795.00. Do not forget the fees: $250 of fees saves $37.50 of federal tax at 15%.

How this connects

Run your own numbers with the crypto capital gains tax calculator or the capital gains tax on stocks calculator. For the brackets, see the 2026 capital gains tax brackets; for quarterly payments, the estimated quarterly tax calculator.

Cite this guideBright Side Kit. “How to Calculate Capital Gains Tax on Crypto: A Guide” brightoolbox.com, 2026. Method: gain = coins × (sell − buy) − fees; long-term, the gain stacks on other income across the 0/15/20% bands (0% through $49,450 single, $98,900 MFJ; 15% through $545,500 single, $613,700 MFJ); short-term, the gain is taxed at the ordinary rates; NIIT = 3.8% × min(gain, MAGI over $200,000 single / $250,000 MFJ); state tax = gain × state rate. With 0 coins there is no trade — fees do not apply. Example: 2.5 coins, $40,000 buy, $90,000 sell, $250 fees, long-term, $80,000 other income → gain $124,750.00, tax $18,893.00, proceeds $206,107.00. Reverses: $92,355.32 (92355.3191), 1.3383 coins (1.3383333), $89,900.00, $156,185.11 (156185.1064), 5.00%, $40,100.00. Bright Side Kit. "How to Calculate Capital Gains Tax on Crypto: A Guide" https://brightoolbox.com/guides/how-to-calculate-capital-gains-tax-on-crypto/ Accessed October 25, 2026.

Keep reading: Crypto Capital Gains Tax Calculator · Capital Gains Tax on Stocks Calculator · 2026 Capital Gains Tax Brackets · Estimated Quarterly Tax Calculator

Frequently asked questions

How do I calculate capital gains tax on crypto?

In five steps: the gain, the bands, the NIIT, the state tax, and the total. On 2.5 coins bought at $40,000 and sold at $90,000, long-term, single, $80,000.00 of other income, the gain is $124,750.00 and the tax is $18,893.00.

How much tax do I pay if I sell crypto after one year?

On the defaults, $18,893.00 — the whole $124,750.00 gain falls in the 15% band, plus $180.50 of NIIT. Held more than a year, the gain is long-term. Held a year or less, the same gain costs $29,844.50, because it is taxed like wages at 22%, 24% and 32%.

When do I pay 0% capital gains tax on crypto?

When your taxable income, including the gain, stays under the 0% threshold — $49,450.00 single, $98,900.00 married filing jointly. With $30,000.00 of other income the tax is $15,795.00; a married couple with $80,000.00 of income owes $15,877.50 on the same sale. The sell price for $0.00 tax is $40,100.00.

What is the 3.8% NIIT on a crypto sale?

The net investment income tax adds 3.8% on the gain once your MAGI passes $200,000.00 single ($250,000.00 married filing jointly). MAGI is your other taxable income plus the gain. On the defaults the NIIT is $180.50; at a $400,000.00 sell price it is $29,630.50; with $545,500.00 of other income it is $4,740.50.

What sell price gives exactly $50,000 of tax?

$156,185.11. At that price the gain is $290,212.78 and the tax is $50,000.00. The exact price is 156185.1064; at $156,184.11 the tax is $49,999.53 — $156,185.11 is the nearest cent.

Can I deduct a crypto loss?

Yes — up to $3,000.00 a year against ordinary income, with the rest carried forward. At a $30,000.00 sell price the loss is $25,250.00: $3,000.00 is deductible this year and $22,250.00 carries forward. And because the wash-sale rule does not currently apply to crypto, you can buy the coin back right away.