Calculate capital gains tax owed for short-term and long-term holdings based on US federal tax brackets including the Net Investment Income Tax (NIIT). See your effective tax rate, total gain, and net proceeds after taxes.
Long-term capital gains (assets held for more than one year) are taxed at preferential rates. Short-term gains are taxed as ordinary income. The Net Investment Income Tax (NIIT) of 3.8% applies above certain income thresholds.
| Tax Rate | Taxable Income Range |
|---|---|
| 0% | $0 – $48,350 |
| 15% | $48,351 – $533,400 |
| 20% | $533,401+ |
Plus 3.8% NIIT on the lesser of net investment income or MAGI over $200,000.
| Tax Rate | Taxable Income Range |
|---|---|
| 0% | $0 – $96,700 |
| 15% | $96,701 – $600,050 |
| 20% | $600,051+ |
Plus 3.8% NIIT on the lesser of net investment income or MAGI over $250,000.
| Tax Rate | Taxable Income Range |
|---|---|
| 0% | $0 – $64,750 |
| 15% | $64,751 – $566,700 |
| 20% | $566,701+ |
Plus 3.8% NIIT on the lesser of net investment income or MAGI over $200,000.
| Tax Rate | Taxable Income Range |
|---|---|
| 0% | $0 – $48,350 |
| 15% | $48,351 – $300,000 |
| 20% | $300,001+ |
Plus 3.8% NIIT on the lesser of net investment income or MAGI over $125,000.
Short-term capital gains (assets held for one year or less) are taxed as ordinary income at your regular income tax rates (10% to 37%). See our Income Tax Calculator for the full ordinary income tax brackets.
| Filing Status | MAGI Threshold |
|---|---|
| Single | $200,000 |
| Head of Household | $200,000 |
| Married Filing Jointly | $250,000 |
| Married Filing Separately | $125,000 |
NIIT = 3.8% × min(net investment income, MAGI − threshold). MAGI = modified adjusted gross income (annual income + capital gain in this calculator).
Note: These brackets are for the 2025 tax year. Tax rates and brackets may be adjusted annually for inflation.
Short-term: Assets held ≤ 1 year. Taxed at ordinary income rates (10%–37%).
Long-term: Assets held > 1 year. Taxed at preferential rates (0%, 15%, or 20%).
Holding assets longer can significantly reduce your tax burden.
A capital gain is the profit you earn when you sell an asset for more than you paid for it. The formula is:
Capital Gain = Sale Price − Purchase Price − Cost Basis Adjustments
Assets include stocks, bonds, real estate, cryptocurrency, collectibles, and other investments.
The NIIT is an additional 3.8% tax that applies to the lesser of your net investment income or the amount by which your modified adjusted gross income (MAGI) exceeds a threshold based on your filing status.
This tax applies even to long-term capital gains that otherwise qualify for the 0% or 15% rates.
Capital losses can offset capital gains, reducing your tax liability. If your losses exceed your gains, you can deduct up to $3,000 ($1,500 if married filing separately) against ordinary income each year.
Unused losses carry forward to future tax years indefinitely.
The calculation depends on the holding period:
Important: The tax rate applied to your long-term capital gains depends on your total taxable income — including the gain itself. A large gain can push you into a higher capital gains bracket.
The single most effective way to reduce capital gains taxes is to hold assets for more than one year. Long-term gains are taxed at 0%, 15%, or 20% — much lower than ordinary income rates (up to 37%).
Sell underperforming investments to realize losses that offset your gains. This strategy, known as tax-loss harvesting, can reduce or eliminate your capital gains tax liability. Be mindful of wash-sale rules — you cannot repurchase the same or substantially identical security within 30 days.
Invest through tax-advantaged accounts like 401(k)s, IRAs, and HSAs to defer or avoid capital gains taxes entirely. Within these accounts, you can trade freely without triggering capital gains taxes. Only withdrawals may be taxable.
Instead of selling appreciated assets and paying tax, consider donating them to charity or gifting them to family members in lower tax brackets. Charitable donations of appreciated assets can provide a deduction for the full fair market value while avoiding capital gains tax.
If you're nearing retirement or expect a lower-income year, consider deferring asset sales until your income drops. A lower total income could qualify you for the 0% long-term capital gains rate, saving you thousands in taxes.
If you sell your primary residence, you may exclude up to $250,000 of gain ($500,000 for married couples filing jointly) from capital gains tax if you've lived in the home for at least 2 of the last 5 years.
A capital gain is the profit realized when you sell a capital asset (such as stocks, bonds, real estate, cryptocurrency, or collectibles) for more than its purchase price (cost basis). The difference between the sale price and the purchase price is your capital gain — and that gain may be subject to taxation.
Capital gains are classified as either short-term (assets held for one year or less) or long-term (assets held for more than one year). This distinction is crucial because the tax treatment differs dramatically between the two classifications.
Short-term capital gains are taxed at your ordinary income tax rates, which range from 10% to 37% depending on your income level and filing status. If you're in the 24% tax bracket, your short-term capital gains are taxed at 24% — the same rate as your wages and salary.
Long-term capital gains benefit from preferential tax rates of 0%, 15%, or 20%, which are significantly lower than ordinary income rates. The rate you pay depends on your total taxable income (including the gain) and your filing status. For example, a single filer with a total taxable income under $48,350 pays 0% on long-term gains — meaning many middle-income investors could pay no federal tax on their investment profits.
The Affordable Care Act introduced the 3.8% Net Investment Income Tax, which applies to higher-income individuals. If your modified adjusted gross income (MAGI) exceeds $200,000 (single or head of household), $250,000 (married filing jointly), or $125,000 (married filing separately), you may be subject to this additional tax on the lesser of your net investment income or the excess MAGI amount.
The NIIT applies on top of your regular capital gains tax. For example, a high-income earner in the 20% long-term capital gains bracket would actually pay 23.8% (20% + 3.8% NIIT) on their investment income.
In addition to federal taxes, most states also tax capital gains. Some states treat capital gains as ordinary income (with progressive rates up to 13.3% in California), while others have flat tax rates. Nine states have no income tax at all: Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, Washington, and Wyoming. Incorporate state taxes into your planning to get a complete picture of your tax liability.
Effective capital gains tax planning can significantly reduce your tax burden:
Our Capital Gains Tax Calculator helps you estimate the federal and state taxes owed on your investment gains. Whether you're planning to sell stocks, real estate, cryptocurrency, or other assets, this tool provides a clear, instant estimate of your tax liability based on current US tax laws.
Uses 2025 capital gains tax brackets including 0%, 15%, and 20% long-term rates, ordinary income rates for short-term gains, and the 3.8% NIIT.
Includes state tax rates for every state, from no-tax states to high-tax states, applied to your capital gains for a complete estimate.
Handles both holding periods correctly — short-term gains taxed at ordinary rates, long-term gains at preferential capital gains rates.
Automatically applies the 3.8% Net Investment Income Tax when your MAGI exceeds the appropriate threshold for your filing status.
All calculations are performed in your browser. No personal or financial information is stored, transmitted, or shared with any third parties.
Complete access to all features with no registration, no hidden fees, and no usage limits. Use it as often as you need.
Important Disclaimer: This Capital Gains Tax Calculator provides estimates for informational and educational purposes only. Tax laws are complex and subject to change. This calculator does not account for all tax situations, including AMT, collectibles rates (28%), qualified small business stock, wash sale adjustments, or other special circumstances. For personalized tax advice, please consult a qualified tax professional, CPA, or tax attorney. Always verify your tax calculations with official IRS resources (Schedule D, Form 8949) or a licensed tax preparer.