๐Ÿ‡บ๐Ÿ‡ธ USC
Taxes & Income
๐Ÿ“ˆ

Capital Gains Tax Calculator

Estimate federal tax on short- and long-term gains (2025)

๐Ÿ“ˆ Gain details

$

Your taxable income before this gain (after deductions).

$

Profit = sale price minus cost basis.

State tax rate (optional)

Leave at 0 to estimate federal tax only. States tax capital gains differently - enter your state's rate if you want it included.

โœ…

Last updated June 2026

Method: Uses the verified 2025 IRS ordinary income tax brackets, the 2025 long-term capital gains thresholds (0% / 15% / 20%), and the 3.8% Net Investment Income Tax MAGI thresholds ($200,000 single/head of household, $250,000 married filing jointly). Figures are for tax year 2025 (returns filed in 2026).

Included: Federal tax on the gain (long-term stacked across 0/15/20% bands or short-term at ordinary rates), the 3.8% NIIT where MAGI exceeds the threshold, an optional user-entered state rate, the effective rate on the gain and net proceeds after tax.

Not included: State tax rules (unless you enter a rate), loss carryforwards, the qualified small business stock exclusion, depreciation recapture, AMT and state-specific exemptions. Results are estimates, not tax advice.

Capital gains tax: everything you need to know

Say you are a single filer with $80,000 of taxable income and you sell stock for a $50,000 long-term gain. That gain stacks on top of your income, landing in the 15% long-term bracket - so you owe about $7,500 in federal capital gains tax and keep $42,500. If you had instead sold after only six months, that same $50,000 would be a short-term gain taxed as ordinary income at your 22%-24% marginal rate, costing roughly $11,500. Holding a little longer can save thousands - which is exactly why this capital gains tax calculator separates short-term from long-term and shows the rate that actually applies. All figures here are for tax year 2025 (returns filed in 2026).

2025 long-term capital gains brackets

Long-term rates depend on your total taxable income, including the gain:

Rate Single Married filing jointly
0%Up to $48,350Up to $96,700
15%$48,350 - $533,400$96,700 - $600,050
20%Over $533,400Over $600,050

Short-term gains use the ordinary income brackets instead (10%, 12%, 22%, 24%, 32%, 35%, 37%).

How the long-term tax is calculated

Your taxable income fills the brackets first; then the gain stacks on top and is split across whichever 0/15/20% bands are left:

Tax = gain in 0% band × 0 + gain in 15% band × 0.15 + gain in 20% band × 0.20

In the example above, the single filer's $80,000 income already passes the $48,350 zero-rate ceiling, so the entire $50,000 gain falls in the 15% band: $50,000 × 0.15 = $7,500. If part of your income sat below $48,350, that slice of the gain would be taxed at 0%.

The 3.8% Net Investment Income Tax (NIIT)

High earners owe an extra 3.8% NIIT on investment income. It applies to the lesser of your net investment income or the amount your modified AGI exceeds $200,000 (single or head of household) or $250,000 (married filing jointly). For example, a single filer with $250,000 of MAGI that includes a $50,000 gain pays 3.8% on the full $50,000 (because MAGI exceeds the threshold by more than the gain), adding $1,900 on top of the regular capital gains tax.

Ways to reduce the tax

  • Hold over one year: turns ordinary-rate short-term gains into 0/15/20% long-term gains.
  • Harvest losses: capital losses offset capital gains dollar-for-dollar, and up to $3,000 of ordinary income per year.
  • Time the sale: realizing gains in a lower-income year can keep you in the 0% or 15% band.
  • Use tax-advantaged accounts: gains inside a 401(k) or IRA aren't taxed until (or unless) you withdraw.

How to use this capital gains calculator

You only need a few numbers to get a realistic federal estimate. Work through the fields in order:

  1. Gain amount: enter your profit - the sale price minus your cost basis (what you paid, plus commissions and qualifying improvements). Do not enter the full sale price.
  2. Holding period: mark the gain as long-term if you held the asset more than one year, or short-term if you held it one year or less. This single switch usually changes the tax the most.
  3. Filing status: choose single, married filing jointly, or head of household. The status sets which 0/15/20% breakpoints and which NIIT threshold apply.
  4. Other taxable income: add your taxable income before the gain. The calculator stacks the gain on top of this to decide which long-term band it falls into.
  5. State rate (optional): if you want to fold in state tax, type your state's rate; leave it blank for a federal-only estimate.

The result updates instantly: read the estimated federal tax, any 3.8% NIIT, the effective rate on the gain, and your net proceeds after tax.

Who this calculator is for

This tool is built for anyone who has sold - or is about to sell - an appreciated asset and wants a quick, accurate tax estimate. That includes:

  • Investors selling stocks, ETFs, mutual funds, or bonds in a taxable brokerage account.
  • Crypto holders realizing gains, since the IRS treats digital assets as property subject to capital gains rules.
  • Home sellers with a gain above the primary-residence exclusion ($250,000 single / $500,000 married), or selling a second home or rental.
  • Employees selling vested RSUs, ESPP shares, or exercised stock options after the holding clock has run.
  • Year-end planners deciding whether to harvest losses or defer a sale into January to land in a lower bracket.

A second worked example: hitting the 0% band

Suppose you are a single filer with just $30,000 of taxable income and you sell stock for a $20,000 long-term gain. Your income sits $18,350 below the $48,350 zero-rate ceiling, so the first $18,350 of the gain is taxed at 0%. The remaining $1,650 spills into the 15% band, costing $1,650 × 0.15 = about $248 in federal tax. You keep nearly all of the gain. The lesson: a low-income year is a powerful window to realize long-term gains cheaply - sometimes completely tax-free at the federal level - which is why retirees and people between jobs often time sales for exactly those years.

Scenario comparison: same $50,000 gain, different situations

Using a $50,000 gain as the baseline, here is how a few common choices change the federal tax (illustrative, federal only):

  • Held 6 months, $80,000 other income (single): short-term, taxed as ordinary income near your 22%-24% marginal rate - roughly $11,500.
  • Held 18 months, $80,000 other income (single): long-term in the 15% band - $7,500, a saving of about $4,000 just from waiting past the one-year mark.
  • Held 18 months, $30,000 other income (single): part of the gain lands in the 0% band, so the tax drops to roughly $3,200.
  • Held 18 months, $250,000 MAGI (single): 20% top band plus the 3.8% NIIT can push the combined federal bill toward $11,900 on the same gain.

The takeaway: holding period, your other income, and the NIIT threshold often move the bill far more than people expect for an identical-sized gain.

Key terms explained

  • Cost basis: what you originally paid for the asset, plus commissions, fees, and qualifying improvements. Gain = sale price − cost basis.
  • Realized vs. unrealized gain: a gain is only taxed when you realize it by selling. Paper (unrealized) gains on assets you still hold are not taxed.
  • Holding period: the clock starts the day after you buy and ends on the sale date. More than one year = long-term; one year or less = short-term.
  • MAGI (modified adjusted gross income): the income figure used to test the 3.8% NIIT thresholds ($200,000 single/HoH, $250,000 MFJ).
  • Wash sale: if you sell at a loss and buy a substantially identical security within 30 days, the IRS disallows the loss for that sale.
  • Step-up in basis: inherited assets generally reset to their fair market value at the date of death, often erasing the prior gain for heirs.

What changes the result the most

If you adjust the inputs and watch the tax move, a few factors dominate:

  • Holding period: the single biggest lever - short-term (ordinary rates up to 37%) versus long-term (0/15/20%) can roughly halve the bill.
  • Your other income: it fills the brackets first, deciding whether the gain lands in the 0%, 15%, or 20% band.
  • Gain size: a very large gain can push part of itself from the 15% band into the 20% band, or over the NIIT threshold.
  • Filing status: married filing jointly has roughly double the breakpoints, so the same gain can be taxed lower.
  • State rate: a high-tax state can add several percentage points; states with no income tax add nothing.

Limitations and assumptions

This calculator is a planning estimate, not a tax return. Keep these assumptions in mind:

  • It estimates federal capital gains tax (plus NIIT) and adds state tax only if you enter a rate; it does not apply state-specific rules, brackets, or exemptions.
  • It does not net capital losses or loss carryforwards against your gain - net those yourself before entering the figure.
  • It excludes special regimes such as the qualified small business stock (QSBS) exclusion, collectibles (taxed up to 28%), Section 1250 depreciation recapture on real estate (up to 25%), and the AMT.
  • It assumes the gain is fully taxable; it does not apply the home-sale exclusion or 1031 like-kind exchange deferral.
  • Figures use 2025 thresholds (returns filed in 2026). Brackets are inflation-adjusted each year.

How it compares to related calculators

This page answers "how much tax will I owe on this gain?" If you have a different question, a sister tool fits better:

  • To estimate tax on your wages and total income, use the Income Tax Calculator.
  • To find your marginal bracket, use the Tax Bracket Calculator.
  • To see the average rate across all your income, use the Effective Tax Rate Calculator.
  • To estimate a refund or balance due, use the Tax Refund Calculator.
  • To check take-home pay after withholding, use the Paycheck Calculator.

โš ๏ธ Common mistakes & edge cases

Confusing the sale price with the gain

You are taxed on the profit, not the whole sale. If you sell stock for $60,000 that cost you $40,000, only the $20,000 gain is taxed - not the full $60,000. Always enter sale price minus cost basis.

Assuming long-term gains have their own flat rate

The 0/15/20% rate isn't fixed - it depends on your total taxable income with the gain stacked on top. A large gain can push part of itself from the 15% band into the 20% band.

Forgetting the 3.8% NIIT

If your MAGI is over $200,000 (single) or $250,000 (married filing jointly), you may owe an additional 3.8% on investment income on top of the headline capital gains rate. It's easy to miss when estimating.

Ignoring state taxes

Most states tax capital gains, often as ordinary income, and a few have no income tax at all. This tool is federal-only unless you enter a state rate, so a "tax-free" 0% federal result may still owe state tax.

Note: This calculator gives an estimate, not tax advice. Your actual liability depends on your full return, other income, deductions, losses and state rules.

❓ Frequently asked questions

How are long-term capital gains taxed in 2025?

Long-term gains (assets held more than one year) are taxed at 0%, 15% or 20% depending on your total taxable income. For 2025 a single filer pays 0% up to $48,350 of taxable income, 15% from $48,350 to $533,400, and 20% above that. For married filing jointly the breakpoints are $96,700 and $600,050. The gain stacks on top of your ordinary income to decide which rate applies.

How are short-term capital gains taxed?

Short-term gains - profits on assets held one year or less - are taxed as ordinary income at your regular federal income tax rate (10% to 37% in 2025). They are added on top of your other income, so a short-term gain can be taxed much higher than a long-term gain.

What is the 3.8% Net Investment Income Tax (NIIT)?

The NIIT is an extra 3.8% tax on net investment income (including capital gains) for higher earners. It applies to the smaller of your net investment income or the amount your modified adjusted gross income (MAGI) exceeds $200,000 (single or head of household) or $250,000 (married filing jointly). It is on top of regular capital gains tax.

What counts as a long-term vs short-term holding?

The holding period starts the day after you acquire the asset and ends on the day you sell it. If you held it for more than one year, the gain is long-term and qualifies for the lower 0/15/20% rates. One year or less is short-term and taxed as ordinary income.

Does this calculator include state capital gains tax?

By default it estimates federal tax only. Most states also tax capital gains, often at your ordinary state income tax rate. You can enter your state's rate in the optional field and the calculator will add it to the estimate, but it does not look up state rules automatically.

How do I lower my capital gains tax?

Common strategies include holding assets more than a year to get long-term rates, harvesting losses to offset gains, timing sales for a lower-income year to stay in the 0% or 15% band, and using tax-advantaged accounts like a 401(k) or IRA. This calculator estimates the tax; consult a tax professional before acting.

Is the gain amount the sale price or the profit?

Enter the profit, not the sale price. Your capital gain is the sale price minus your cost basis (what you paid, plus commissions and certain improvements). Only the gain is taxed - returning your original investment is not.

How is cryptocurrency taxed when I sell?

The IRS treats cryptocurrency as property, so selling, trading, or spending it triggers a capital gain or loss just like stock. Held more than a year, it gets the long-term 0/15/20% rates; one year or less, it is short-term and taxed as ordinary income. Your gain is the sale or exchange value minus your cost basis. This calculator works the same way for crypto - enter the gain and holding period.

Do I pay capital gains tax when I sell my home?

Often not on the full gain. If you owned and lived in the home as your main residence for at least two of the last five years, you can exclude up to $250,000 of gain (single) or $500,000 (married filing jointly). Only the gain above the exclusion is taxable, and it is long-term if you held the home over a year. This calculator does not apply the home-sale exclusion automatically - enter only the taxable portion of the gain.

What is a wash sale and how does it affect my taxes?

A wash sale happens when you sell a security at a loss and buy a substantially identical one within 30 days before or after the sale. The IRS disallows the loss for that sale; instead it is added to the cost basis of the replacement shares. The rule is meant to stop investors from claiming a loss while keeping the same position. It applies to losses, not gains.

Can capital losses reduce my tax bill?

Yes. Capital losses first offset capital gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 of the excess against ordinary income each year ($1,500 if married filing separately), and carry any remaining loss forward to future years. Net your losses against your gains before entering a figure in this calculator.

What is a step-up in basis for inherited assets?

When you inherit an asset, its cost basis is generally reset (stepped up) to the fair market value on the date the previous owner died. That often wipes out the gain that built up during their lifetime, so if you sell soon after inheriting, the taxable gain may be small or zero. This is one of the most significant capital-gains breaks in the tax code.

๐Ÿ’ก Good to know

The one-year clock can save you thousands

Selling even a day too early turns a long-term gain (0/15/20%) into a short-term gain taxed at ordinary rates up to 37%. Check the exact purchase date before you sell - waiting past the anniversary is often the single cheapest tax move available.

A 0% rate really does exist

If your total taxable income (with the gain stacked on top) stays under $48,350 single or $96,700 married filing jointly in 2025, that portion of long-term gain is taxed at 0% federally. Low-income years - retirement, sabbaticals, between jobs - are a window to realize gains nearly tax-free.

Don't forget state tax and the NIIT

A 0% federal result can still owe state tax, since most states tax gains as ordinary income. And once your MAGI passes $200,000 (single) or $250,000 (married filing jointly), the 3.8% Net Investment Income Tax stacks on top of the headline rate.

Related Calculators