Capital Gains Tax Calculator

The Capital Gains Tax Calculator estimates the US federal tax you would owe on an investment gain before you sell, so you can weigh the real cost first. You enter your filing status, other taxable income, holding period, gain amount, and an optional NIIT toggle. It returns the estimated federal tax, your effective and marginal rates, and your after-tax gain.

Held more than a year: your gain is taxed at the lower 0/15/20% long-term rates.

Advanced options
Capital gains tax
$1,500.00
15% long-term rate · on a $10,000 gain · effective 15.0%
Educational only, not tax advice. This is an educational estimate, not tax advice. It covers US federal capital gains tax only (no state tax) for the 2025 tax year (returns filed in 2026). Verify your situation with the IRS or a qualified tax professional.
Rate type
Long-term
Effective rate
15.0%
Marginal rate
15%
After-tax gain
$8,500.00
NIIT (3.8%)
$1,900.00

Long-term rate: you pay $1,500.00 (15.0% effective) instead of the $2,200.00 you'd owe short-term: holding over a year saves you $700.00.

Show the math
$1,500.00 = $10,000 taxed at 15% (stacked from $50,000 income; 0% band up to $48,350)
Reviewed by Filippo Ucchino Founder, InvestinGoal

These results are estimates for educational purposes only and are not financial, investment or tax advice.

This is an educational estimate, not tax advice. It covers US federal capital gains tax only, so it does not include state tax, and states that tax capital gains add their own charge on top. Figures use the 2025 tax year brackets (returns filed in 2026), which the IRS resets each year. For your own situation, check the IRS or a qualified tax professional.

What is a capital gains tax calculator?

A capital gains tax calculator is a tool that estimates the US federal tax you owe on a realized capital gain, the profit (sale proceeds minus your cost basis) from selling an asset such as a stock, a fund, or a coin. The taxable amount is the gain, not the whole sale price: you are taxed only on the profit, and only once the gain is realized, meaning you have actually sold. The IRS treats that realized profit as investment income under its Publication 550, so a position that has risen in value while you still hold it is an unrealized gain and owes nothing until you dispose of it.

The metric it computes, capital gains tax, depends above all on how long you held the asset before selling, because the US taxes short-term gains far more heavily than long-term gains. The calculator turns your filing status, other taxable income, gain and holding period into an estimated federal tax figure, an effective rate, and your after-tax gain.

Why is the capital gains tax calculator important for investors?

The capital gains tax calculator is important for investors because the tax is a real cost that erodes the net return on an investment, and estimating it before you sell shows what you actually keep. A headline profit is not what lands in your account: on a $10,000 long-term gain, a single filer with $50,000 of income keeps $8,500.00 after a $1,500.00 federal tax, while the same gain sold too early costs $2,200.00. Knowing that figure before you place the sell order is what turns a gross profit into a decision you can judge.

Investors reach for the calculator at the moment of decision, before realizing a gain rather than after. You use it whenever you are weighing a sale, and especially near year-end, when the choice to hold a few more weeks, harvest a loss, or push a sale into January changes the tax you owe. Because the tax is part of the real return on investing, running the number first is the difference between an estimated after-tax outcome and a surprise at filing time.

How do you use the capital gains tax calculator?

To use the capital gains tax calculator, enter your filing status, other taxable income, holding period and capital gain amount, set the optional NIIT toggle, and the tool returns the estimated federal tax, your effective and marginal rates, and your after-tax gain.

The steps to use the capital gains tax calculator are listed below:

  1. Select your filing status. Choose single, married filing jointly (MFJ), head of household (HoH), or married filing separately (MFS), because this sets which tax brackets and thresholds apply to you.
  2. Enter your other taxable income. This is your taxable income after deductions rather than your gross salary, since the gain stacks on top of it; if you start from gross pay, subtract your deduction first, and the 2025 standard deduction is $15,000 for single or MFS, $30,000 for MFJ, and $22,500 for HoH.
  3. Choose your holding period. Select Long-term if you held the asset more than one year, which uses the 0/15/20% rates, or Short-term if you held it one year or less, which is taxed as ordinary income.
  4. Enter your capital gain amount. This is your net realized gain, and a negative number is treated as a capital loss, for which the tool returns $0.00 tax and flags the loss you can carry.
  5. Set the NIIT toggle. Turn on Include NIIT (3.8%) if your income is near or above the Net Investment Income Tax thresholds, and leave it off otherwise.

One advanced field refines the result: Tax year, fixed at 2025 in this version. Every amount is in US dollars, the currency the federal brackets and thresholds are set in. Recalculating on the other holding-period tab takes one press of Calculate, so you can compare a short-term and a long-term outcome before you sell.

What formula does the capital gains tax calculator use?

The capital gains tax calculator uses two formulas, chosen by holding period: a long-term gain is stacked on your income and taxed at 0%, 15% or 20% by band, while a short-term gain is taxed as ordinary income, computed as the tax on your income plus the gain minus the tax on your income alone.

long-term tax=15%×gain15%+20%×gain20% short-term tax=ordinary tax(income+gain)ordinary tax(income)

In these formulas, income is your other taxable income after deductions, gain is your net realized capital gain, and the two bracketed terms are the portions of a long-term gain that fall in the 15% and 20% bands once the gain is stacked on your income. The share of a long-term gain that stays inside the 0% band is untaxed, which is why it does not appear in the long-term formula, and ordinary tax is the progressive income-tax total on a given amount.

Plugging in the base values, a $10,000 long-term gain that sits entirely in the 15% band above the $48,350 single threshold gives 15% × $10,000 = $1,500.00.

The formula assumes the income you enter is already taxable income net of deductions rather than gross pay, and the 3.8% NIIT, when it applies, is added on top of the figure above.

What is an example of a capital gains tax calculation on a stock sale?

An example of a capital gains tax calculation on a stock sale is a single filer with $50,000 of other taxable income selling a stock for a $10,000 long-term gain, which is taxed at 15% for $1,500.00, worked out as follows:

  1. Stack the gain on your income. The $10,000 gain sits on top of $50,000 of income, so your total taxable income is $60,000.
  2. Find the long-term band. For a single filer the 0% band runs up to $48,350 and the 15% band runs above it, so the whole $10,000 gain falls in the 15% band.
  3. Apply the rate. 15% × $10,000 = $1,500.00, an effective rate of 15.00%, which leaves an after-tax gain of $8,500.00.

Selling stocks is the most common capital-gains event, and the holding period changes the bill sharply. Held short-term instead, that same $10,000 stacks on $50,000 and lands in the 22% ordinary bracket, so the tax is $2,200.00. Selling one year and one day later rather than within the year therefore saves $700.00 on an identical profit.

A single gain can also be taxed at more than one rate, because it fills the bands from the bottom up. Take a single filer with $40,000 of income and a $20,000 long-term gain: the first $8,350 of the gain fills the room up to the $48,350 threshold and is taxed at 0%, while the remaining $11,650 is taxed at 15% for $1,747.50. The effective rate on the whole gain is just 8.74%, lower than the headline 15% because part of the gain slipped into the 0% band.

How do you read the capital gains tax calculator's result?

You read the capital gains tax calculator's result by taking the headline tax as the estimated federal cost of the sale, then reading the rate type, effective rate, marginal rate and after-tax gain to see how that cost was built and what you keep. The headline figure is the tax itself, for example $1,500.00, and the after-tax gain shown below it, $8,500.00, is what remains of the profit once that tax is paid.

The two rate figures answer different questions. The effective rate is the tax divided by the whole gain, 15.0% in the base case, and it tells you the average bite across the entire gain. The marginal rate is the rate on the last dollar of the gain, which for a long-term gain is the 0%, 15% or 20% set out in IRS Topic no. 409, and for a short-term gain is your top ordinary bracket. The rate type card simply confirms whether the gain was treated as Long-term or Short-term, the single input that most changes the number.

A result of $0.00 is meaningful rather than an error: it means your total taxable income kept the whole long-term gain inside the 0% band, so no federal tax is due. When you switch the NIIT toggle on and your income is above the threshold, a separate line adds the 3.8% Net Investment Income Tax, the surcharge under Internal Revenue Code Section 1411, on the amount over the threshold, so the total you read is the base capital gains tax plus that surcharge.

What are the limits of the capital gains tax calculator for state and country-specific taxes?

The main limit of the capital gains tax calculator is that it covers US federal tax only, so it excludes state tax entirely, and states that tax capital gains add their own charge on top of the federal figure. Most US states tax capital gains, several tax them as ordinary state income with no preferential long-term rate, and a handful levy no income tax at all, so your all-in rate can be meaningfully higher than the 0/15/20% federal bands suggest. Investors outside the US face their own country-specific tax rules, which this federal model does not attempt to reproduce, and a per-state and per-country view is planned rather than part of the tool today.

Beyond jurisdiction, the result is only an estimate that is as accurate as the inputs you feed it, so the gain must be your correct net realized figure and the income must be taxable income after deductions. The calculator also excludes two cases that follow different rules and should not be treated as ordinary capital gains: the sale of a primary home, which has the Internal Revenue Code Section 121 exclusion and depreciation-recapture rules, and estate tax, a separate tax on inherited wealth rather than a gain you realized. It is an educational tool, not tax advice, and it does not know your full return.

How do you lower the capital gains tax the calculator estimates?

You lower the capital gains tax the calculator estimates through a few legitimate, widely-used levers, and this is general education rather than personalised advice. The main levers are listed below:

  • Hold for more than a year. The clearest lever moves a gain from ordinary short-term rates to the preferential 0/15/20% long-term rates, and in the base example that alone is the difference between $2,200.00 and $1,500.00 on the same $10,000 gain.
  • Realise gains in low-income years. Selling a long-term asset while your total taxable income stays under the 0% threshold for your status can mean no federal tax on the gain, which is why the same sale can cost less in a lower-income year.
  • Harvest losses. Realised losses offset realized gains dollar-for-dollar, and if your losses exceed your gains you can deduct up to $3,000 per year against ordinary income under IRS Topic no. 409 and carry the rest forward to future years.

Each lever changes an input the calculator already reads, whether the holding period, the income, or the sign of the gain, so you can test any of them by re-running the number before you sell. A negative gain, for instance, returns $0.00 tax and flags the capital loss you can carry.

What is the difference between a short-term and a long-term capital gains tax calculation?

A short-term capital gains tax calculation differs from a long-term one in the holding period and the rates applied: a short-term gain, on an asset held one year or less, is taxed as ordinary income at rates up to 37%, while a long-term gain, on an asset held more than one year, is taxed at the preferential 0%, 15% or 20% rates. It is the single most important distinction the calculator captures, because the same profit can cost very different amounts of tax depending only on when you sell.

AttributeShort-term gainLong-term gain
Holding periodOne year or lessMore than one year
Rate typeOrdinary income ratesPreferential capital gains rates
Rate range10% to 37%0%, 15% or 20%
How it is computedTaxed at your marginal ordinary rateStacked on income, taxed by band

On the base example of a single filer with $50,000 of income and a $10,000 gain, the short-term calculation produces $2,200.00 at a 22% marginal rate, while the long-term calculation produces $1,500.00, so the same gain held past the one-year mark is $700.00 cheaper. Crypto and day-trading gains run through the same short-term-versus-long-term logic but carry their own network of rules, which is why they have dedicated calculators rather than a tab here.

What 2025 capital gains tax brackets does the calculator use?

The capital gains tax calculator uses the 2025 US federal brackets published by the IRS in Revenue Procedure 2024-40: the ordinary income brackets that apply to short-term gains, and the 0/15/20% long-term thresholds set by filing status. The three tables below are the reference grid behind every figure the tool produces for the 2025 tax year, and they are the numbers to check a result against.

The ordinary income brackets apply to short-term gains, which are taxed like salary. The rate shown is the marginal rate on taxable income within each band.

RateSingle / MFSMarried filing jointlyHead of household
10%$0 – $11,925$0 – $23,850$0 – $17,000
12%$11,925 – $48,475$23,850 – $96,950$17,000 – $64,850
22%$48,475 – $103,350$96,950 – $206,700$64,850 – $103,350
24%$103,350 – $197,300$206,700 – $394,600$103,350 – $197,300
32%$197,300 – $250,525$394,600 – $501,050$197,300 – $250,500
35%$250,525 – $626,350¹$501,050 – $751,600$250,500 – $626,350
37%Over $626,350¹Over $751,600Over $626,350

¹ Single and MFS share these bands up to $250,525. Above that they diverge: single pays 35% to $626,350 then 37% above it, while MFS pays 35% to $375,800 then 37% above it.

The long-term capital gains thresholds apply to assets held more than a year. The gain is stacked on top of your ordinary income, so where it lands depends on your total taxable income.

Filing status0% up to15% band20% above
Single$48,350$48,350 – $533,400Over $533,400
Married filing jointly$96,700$96,700 – $600,050Over $600,050
Head of household$64,750$64,750 – $566,700Over $566,700
Married filing separately$48,350$48,350 – $300,000Over $300,000

The Net Investment Income Tax adds 3.8% once modified adjusted gross income crosses a fixed threshold that, under Internal Revenue Code Section 1411, has not been indexed for inflation since 2013.

Filing statusNIIT threshold (MAGI)
Single / Head of household$200,000
Married filing jointly$250,000
Married filing separately$125,000

These 2025 figures are reconfirmed against the IRS each year, so a gain modelled for a later tax year would use updated thresholds.

Which calculators are related to the capital gains tax calculator?

The calculators related to the capital gains tax calculator are listed below:

  • The Crypto tax calculator applies the same federal short-term and long-term logic to crypto, where each disposal is a taxable event with its own reporting rules.
  • The Day trading tax calculator handles gains that are almost always short-term, adding the wash-sale rule and the trader-specific treatment that frequent trading triggers.
  • The Stock profit calculator works out the gross profit or loss on a stock trade, the pre-tax figure that this calculator then taxes.
  • The Percentage gain calculator turns a buy and sell price into a percentage return, the starting point for the gain you enter here.
  • The Compound interest calculator projects how the after-tax proceeds grow if you reinvest them, the natural next step once the tax is settled.

Together they cover the sequence a realized investment runs through: the gross result, the percentage return, the tax owed, and the growth of what is left.

FAQ

Do you pay capital gains tax if you don't sell the asset?

No, you do not pay capital gains tax if you do not sell the asset. The tax applies only to a realised gain, which happens when you actually sell. A holding that has risen in value carries an unrealised gain and owes nothing until you dispose of it, so choosing when to sell is itself a tax decision.

Does a capital gain push you into a higher tax bracket?

A long-term capital gain does not raise the rate on your ordinary income, but a short-term gain can. A long-term gain stacks on top of your income and uses up your 0% band without changing your ordinary rate. A short-term gain is taxed as ordinary income, so it can push part of your income into a higher bracket.

Are collectibles, a home sale, or crypto taxed the same way?

No, collectibles, a home sale and crypto are not all taxed like an ordinary stock gain. Collectibles carry a maximum 28% long-term rate under IRS Topic no. 409. A primary home has the Section 121 exclusion. Crypto is taxed as a disposal at the same short-term or long-term rates, which the dedicated crypto tax calculator handles.

What happens if you have a capital loss instead of a gain?

If you have a capital loss instead of a gain, you owe no capital gains tax. The loss first offsets your realised gains dollar-for-dollar. If your losses exceed your gains, you can deduct up to $3,000 per year against ordinary income under IRS Topic no. 409 and carry the remaining loss forward to future tax years.

When do you pay capital gains tax for the 2025 tax year?

You pay capital gains tax for the 2025 tax year when you file your federal return in 2026. Capital gains are not withheld from a paycheck, so if a gain is large the IRS may expect quarterly estimated tax payments during 2025 rather than a single payment at filing. Check the current IRS deadlines for your situation.

This tool is for education, not tax advice. It estimates US federal capital gains tax for the 2025 tax year only, and it excludes state tax and your personal circumstances. Confirm anything that affects a real return with the IRS or a qualified tax professional.