Capital Gains Tax Calculator: Estimate Short-Term vs. Long-Term Capital Gains Taxes
Enter your filing status, ordinary income, and capital gains to see your short-term tax, long-term tax, NIIT surtax, and overall effective tax rate, updated instantly as you type.
Taxpayer Profile
Your filing status and ordinary income determine which tax brackets your gains land in.
$
Wages, self-employment, and other ordinary income, after deductions. Exclude capital gains here.
Investment Returns
Enter your net capital gains for the year, separated by holding period.
$
Gains on assets held one year or less. Taxed as ordinary income.
$
Gains on assets held more than one year. Taxed at 0%, 15%, or 20%.
Include Net Investment Income Tax (NIIT)
Adds the 3.8% NIIT surtax to your results if your total income exceeds the threshold for your filing status ($200,000 Single/HOH, $250,000 MFJ, $125,000 MFS).
Your Results
Updates automatically as you change any value above.
Total Estimated Tax Due on Gains
$0
Short-term tax + long-term tax + NIIT surtax
Short-Term Tax
$0
Taxed as ordinary income
Long-Term Tax
$0
At 0% / 15% / 20% rates
NIIT Surtax
$0
3.8% on investment income
Effective Tax Rate on Gains
Total tax due on gains divided by total capital gains
0.0%
Long-Term Gains Bracket Breakdown
How your $20,000 of long-term gains is apportioned across the 0%, 15%, and 20% rate bands.
0% rate: $0
15% rate: $0
20% rate: $0
Estimates only, not tax advice. This calculator applies simplified 2025 federal tax brackets, long-term capital gains thresholds, and Net Investment Income Tax rules. It does not include state or local taxes, the Alternative Minimum Tax, qualified dividends, deductions, credits, or special asset rules (such as collectibles or Section 1250 property). Consult a CPA or tax professional before making financial decisions.
Advertisement
Key Terms Explained
Short-Term Capital Gains
Profit from selling an asset, such as a stock or crypto, that you owned for one year or less. The IRS taxes short-term gains as ordinary income, at the same rates that apply to your salary.
Long-Term Capital Gains
Profit from selling an asset you owned for more than one year. These gains qualify for preferential federal rates of 0%, 15%, or 20%, which are usually lower than ordinary income tax rates.
Net Investment Income Tax (NIIT)
An additional 3.8% federal surtax on investment income (capital gains, interest, dividends, and similar income) for taxpayers whose modified adjusted gross income exceeds a statutory threshold based on filing status.
Progressive Tax Brackets
A system where income is divided into bands, each taxed at a different rate. Only the portion of income within a given band is taxed at that band's rate, so earning more never reduces your take-home pay from the income below a threshold.
Taxable Income
Your income after subtracting deductions, such as the standard deduction or itemized deductions. Tax brackets and capital gains thresholds are applied to this number, not your gross income.
Cost Basis
The original purchase price of an asset, plus certain fees and adjustments. Your capital gain equals the sale price minus the cost basis. A higher cost basis means a smaller taxable gain.
Modified Adjusted Gross Income (MAGI)
Your adjusted gross income with certain deductions added back. For most taxpayers, MAGI is close to total income before deductions, and it is the figure used to test whether NIIT applies.
Marginal Tax Rate
The tax rate that applies to your next dollar of income. This is the rate used to calculate the tax on short-term gains that are stacked on top of your existing ordinary income.
Effective Tax Rate
Your total tax divided by the relevant income. In this tool, the effective tax rate on gains is your total estimated tax on gains divided by your total capital gains, giving a single blended percentage.
Stacking
The IRS approach of treating ordinary income as the base layer, with short-term gains stacked on top, and long-term gains stacked on top of that. The position of each layer determines which bracket or rate it falls into.
The Complete Guide to Capital Gains Tax
Selling an investment for a profit triggers a tax bill, but how much you owe depends on how long you held the asset, how much other income you have, and your filing status. This guide walks through how the calculator above arrives at its numbers.
How to use this calculator
Start by selecting your filing status and entering your ordinary taxable income, which is your income from sources other than capital gains, after deductions. Then enter your short-term and long-term capital gains separately, since the IRS taxes them very differently. If your investment income (interest, dividends, and capital gains combined) might push your total income above the NIIT threshold, leave the NIIT toggle on, which is the default. Every result updates instantly as you type, so you can test different scenarios, such as selling an asset this year versus waiting until next year, without clicking a button.
How short-term gains are taxed
Short-term capital gains are added directly to your ordinary income and taxed at the same progressive federal rates as your salary: 10%, 12%, 22%, 24%, 32%, 35%, and 37% for 2025. Because your ordinary income fills the lower brackets first, short-term gains are "stacked" on top and taxed at whatever bracket (or brackets) they fall into. The calculator finds the exact tax generated by the short-term gain alone by computing the tax on your ordinary income plus short-term gains, then subtracting the tax on your ordinary income by itself.
How long-term gains are taxed
Long-term capital gains get their own rate schedule of 0%, 15%, and 20%, based on where your total income (ordinary income plus short-term gains plus the long-term gain itself) falls relative to a set of thresholds. For a single filer in 2025, gains are taxed at 0% up to roughly $48,350 of total income, 15% from there up to roughly $533,400, and 20% above that. The calculator apportions your long-term gain across these bands the same way income tax brackets work: each dollar is taxed at the rate for the band it falls into, not a single flat rate for the entire gain.
Filing Status
0% Rate Up To
15% Rate Up To
20% Rate Above
Single
$48,350
$533,400
$533,400
Married Filing Jointly
$96,700
$600,050
$600,050
Married Filing Separately
$48,350
$300,000
$300,000
Head of Household
$64,750
$566,700
$566,700
These figures are 2025 IRS thresholds based on total taxable income, which includes your ordinary income and any short-term gains, not just the long-term gain itself.
How the NIIT surtax is calculated
If enabled, the calculator checks whether your total income (ordinary income plus all capital gains) exceeds the NIIT threshold for your filing status: $200,000 for Single and Head of Household, $250,000 for Married Filing Jointly, and $125,000 for Married Filing Separately. If it does, a 3.8% surtax applies to the smaller of your total capital gains or the amount by which your total income exceeds the threshold. This means NIIT can apply to only part of your gains if you are just over the threshold, or to all of your gains if your income is well above it.
Why timing and income planning matter
Because both the long-term capital gains brackets and the NIIT threshold are based on your total income for the year, the same investment sale can generate very different tax bills depending on what else is happening in your finances that year. Selling a large position in a year with lower ordinary income, such as a sabbatical, early retirement, or a year between jobs, can mean some or all of a long-term gain is taxed at 0% instead of 15% or 20%. Conversely, a large bonus, a Roth conversion, or a business sale in the same year as an investment sale can push gains into higher brackets and trigger NIIT that would not otherwise apply. Running a few scenarios through this calculator before a major sale can help you decide whether to sell all at once or spread the sale across multiple years.
Frequently Asked Questions
Short-term capital gains come from assets you held for one year or less before selling, and they are taxed as ordinary income at your regular federal tax bracket rates (10% to 37% for 2025). Long-term capital gains come from assets held for more than one year, and they get preferential tax rates of 0%, 15%, or 20% depending on your total taxable income. Holding an investment past the one-year mark before selling can significantly lower the tax you owe on the gain.
Your ordinary income, such as salary or wages, fills up the lower tax brackets first. Both your short-term gains and your long-term gains are then stacked on top of that income. For short-term gains, this stacking determines which ordinary income brackets the gain falls into. For long-term gains, the same stacked total determines whether the gain falls into the 0%, 15%, or 20% long-term rate bands. A higher salary pushes both types of gains into higher brackets, even if the gain amount itself does not change.
The Net Investment Income Tax (NIIT) is an additional 3.8% surtax on investment income, including capital gains, interest, and dividends, for taxpayers whose modified adjusted gross income exceeds a statutory threshold. The 2025 thresholds are $200,000 for Single and Head of Household filers, $250,000 for Married Filing Jointly, and $125,000 for Married Filing Separately. The 3.8% applies to the smaller of your net investment income or the amount by which your modified adjusted gross income exceeds the threshold.
Yes. Capital losses first offset capital gains of the same type (short-term losses offset short-term gains, long-term losses offset long-term gains), and any remaining losses can offset the other type. If your total losses exceed your total gains, you can deduct up to $3,000 of the excess against ordinary income each year ($1,500 if Married Filing Separately), and carry forward any remaining loss to future tax years indefinitely. This calculator assumes you are entering net gain figures after any losses have already been applied.
This calculator uses the 2025 federal income tax brackets, the 2025 long-term capital gains rate thresholds, and the statutory Net Investment Income Tax thresholds, which are not inflation-adjusted. It does not include state or local income taxes, the Alternative Minimum Tax, or special rules for collectibles, Section 1250 property, or qualified small business stock.
This tool is designed to give you a fast, realistic estimate so you can plan ahead, such as deciding when to sell an investment or how much to set aside for taxes. It applies the official 2025 bracket math correctly for the inputs you provide, but it simplifies real-world tax returns by not accounting for deductions, credits, qualified dividends, state taxes, or the Alternative Minimum Tax. Use it for planning, and confirm final numbers with a CPA or tax software before filing.