How Much Capital Gains Tax Will You Owe?

Free US capital gains tax calculator — federal rates (0%, 15%, 20%), the 3.8% Net Investment Income Tax, and all 50 state rates. Updated for 2025 IRS figures.

✓ 2025 IRS rates✓ All 50 states✓ NIIT included✓ No sign-up

Your Details

$
Enter income before capital gains — this determines your bracket
$
Sale price minus your cost basis (what you originally paid)
2025 IRS rates — Rev. Proc. 2024-40

Tax Estimate

Estimated Total Tax on Gain
$7,500
on a $50,000 long-term gain
Effective rate: 15.0%
85%you keep
Net gain (you keep)$42,500
Federal CGT$7,500
Capital gain$50,000
Federal long-term rate15.0%
Federal CGT$7,500
Total federal tax$7,500
Total tax$7,500
Net gain after tax$42,500
⚠️ Estimate only — 2025 IRS federal rates plus approximate state top marginal rates. Consult a tax professional before acting on these numbers.

Reduce Your Capital Gains Tax

The right strategy — implemented before the sale — can dramatically cut your bill.

🧾

File with TurboTax

TurboTax handles capital gains, NIIT, Schedule D and Form 8949 automatically — including state returns. Import directly from your brokerage.

Start with TurboTax →
📊

Track Cost Basis Automatically

Tools like Koinly (great for crypto and stocks) and TradeLog calculate your exact cost basis and generate tax reports ready for Schedule D.

Calculate cost basis →
💼

Talk to a Tax Advisor

Complex situations — real estate, business sales, large stock positions — benefit from a CPA. TaxBuzz connects you to vetted tax professionals near you.

Find a CPA →

How Capital Gains Tax Works in the US

Capital gains tax is what you owe when you sell an asset for more than you paid for it. The gain is the difference between your sale price and your cost basis — what you originally paid, adjusted for improvements, fees, and any prior depreciation. The rate you pay depends on two things: how long you held the asset, and how much income you have.

There are two categories. Short-term gains are from assets held one year or less — these are taxed as ordinary income, the same rate as your salary, which can be as high as 37%. Long-term gains are from assets held more than one year, and they get preferential federal rates: 0%, 15%, or 20%.

The Three Long-Term Federal Rates (2025)

The 0% rate is more accessible than most people realize. For 2025, a single filer with taxable income up to $47,025 pays no federal capital gains tax on long-term gains. For married filing jointly, the threshold is $94,050. If you're in a low-income year — retired, between jobs, or have large deductions — you can harvest gains tax-free.

The 15% rate applies to most middle and upper-middle income earners: single filers between $47,025 and $518,900, married filing jointly between $94,050 and $583,750. Above those thresholds, the rate jumps to 20%. Most people land at 15% — which is still meaningfully lower than their ordinary income rate.

The Net Investment Income Tax (NIIT)

The NIIT is one of the least-understood parts of the US tax code. If your modified adjusted gross income (MAGI) exceeds $200,000 (single) or $250,000 (married filing jointly), you owe an additional 3.8% on the lesser of: your net investment income, or the amount by which your MAGI exceeds the threshold.

In practice, if you're already earning over these thresholds, a capital gain typically sits entirely within the NIIT zone. That means a $100,000 long-term gain at the 20% rate actually costs you 23.8% federally — 20% capital gains tax plus 3.8% NIIT. At the 15% bracket with NIIT, the combined federal rate is 18.8%.

State Capital Gains Tax

State tax is where people often get blindsided. Nine states have no income tax at all (Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Wyoming, and Washington for most gains). California is the most punishing — it taxes all capital gains as ordinary income at rates up to 13.3%, with no special long-term rate. A California resident in the top brackets pays a combined 37.1% federal + state on long-term gains.

Massachusetts has an unusual structure: short-term gains (held less than one year) are taxed at 8.5%, while long-term gains are taxed at the standard 5% income rate — one of the few states that distinguishes between holding periods. Hawaii similarly has different rates. Most other states that have income tax simply apply their ordinary income rate to all capital gains.

Tax-Loss Harvesting: Offsetting Gains

You can reduce your capital gains tax bill by selling other investments at a loss in the same tax year. These capital losses offset your gains dollar for dollar. If your losses exceed your gains, you can deduct up to $3,000 against ordinary income per year, carrying forward the rest indefinitely.

Watch out for the wash-sale rule: if you sell a security at a loss and buy the same or substantially identical security within 30 days before or after the sale, the IRS disallows the loss. The wash-sale rule does not currently apply to cryptocurrency — a meaningful planning opportunity.

The Home Sale Exclusion

If you've lived in your home as your primary residence for at least 2 of the last 5 years, you can exclude up to $250,000 of gain from tax — $500,000 if you're married filing jointly. This is one of the most generous tax breaks in the code. Any gain above the exclusion is taxed at long-term rates if you've owned the property for more than a year.

The exclusion can only be used once every two years. And critically: the 2-year residency requirement doesn't have to be continuous — it just needs to add up to 24 months within the 5-year window before the sale.

Frequently Asked Questions

Do I pay capital gains tax on inherited assets?

Generally, no — not immediately. Inherited assets receive a "stepped-up" cost basis to the fair market value at the date of the original owner's death. This means if your parent bought stock for $10,000 and it was worth $200,000 when they died, your basis is $200,000. If you sell immediately, you have no capital gain. If the asset appreciates further after inheritance, only that additional gain is taxable.

How is crypto taxed?

The IRS treats cryptocurrency as property, not currency. Every sale, trade, or use of crypto to purchase goods is a taxable event. Hold crypto for more than a year and any gain is taxed at long-term rates (0%, 15%, or 20%). Hold for a year or less and it's taxed as ordinary income. You can harvest crypto losses without the wash-sale rule limitation — but this may change; legislation has been proposed to close this gap.

What is the difference between realized and unrealized capital gains?

An unrealized gain is "paper profit" — your asset has gone up in value but you haven't sold it yet. You owe no tax on unrealized gains. A realized gain happens when you actually sell the asset. Tax is due in the year you realize the gain. This is why timing matters so much in investment planning.

Can I use a 1031 exchange to defer capital gains on real estate?

Yes. A 1031 (like-kind) exchange allows you to defer capital gains tax when selling an investment property, provided you reinvest the proceeds in a "like-kind" property within the required timeframes: 45 days to identify the replacement property, and 180 days to close. The gain isn't eliminated — it's deferred until you sell the replacement property without doing another exchange. 1031 exchanges apply only to investment or business property, not primary residences.

What if I have both short-term and long-term gains?

They're calculated separately. Long-term gains and losses net against each other; short-term gains and losses net against each other. If after netting you have a long-term loss and a short-term gain, the long-term loss offsets the short-term gain. If you have a net long-term gain and a net short-term gain, each is taxed at its own rate. The $3,000 ordinary income deduction for excess losses applies to the combined net loss.

More Tax Calculators

Free tools for UK and US tax planning.