Calculate Capital Gains Tax
Capital Gains Tax Calculator
Estimate your capital gains tax on stocks, crypto, real estate, and other investments. See federal tax, state tax, NIIT, and your after-tax profit with 2025 rates.
How to Use This Calculator
- Enter purchase price — What you paid for the asset, including commissions and fees.
- Enter sale price — What you sold it for, minus selling costs.
- Enter holding period — How long you held the asset in years (e.g., 1.5 for 18 months).
- Select filing status — Single, Married Filing Jointly, or Head of Household. This determines your tax brackets.
- Enter annual taxable income — Your total taxable income including this capital gain.
- Select your state — For state-level capital gains tax estimation.
- Click Calculate — See your full tax breakdown: federal tax, NIIT, state tax, and after-tax profit.
What Are Capital Gains?
A capital gain is the profit you make when you sell an asset for more than you paid for it. The IRS taxes these gains differently depending on how long you held the asset before selling. Understanding the difference between short-term and long-term capital gains is one of the most important things you can do to minimize your tax bill.
Short-Term Capital Gains (Held Less Than 1 Year)
When you sell an asset you've held for less than one year, the profit is taxed at your ordinary income tax rate — the same rate as your salary or wages. These rates range from 10% to 37% depending on your taxable income and filing status. For a high earner in the 37% bracket, a $100,000 short-term gain means $37,000 in federal tax alone, before state taxes and NIIT. If you buy a stock in March and sell it in December for a profit, that is a short-term capital gain.
Long-Term Capital Gains (Held 1 Year or More)
Assets held for one year or longer qualify for preferential tax rates of 0%, 15%, or 20%, depending on your taxable income. This is one of the most significant tax advantages available to individual investors. The difference between paying 37% on a short-term gain and 15% on a long-term gain can be enormous — on a $100,000 gain, that's $22,000 in savings just by waiting a few extra months to sell. This is why financial advisors often recommend holding investments for at least one year before selling.
2025 Long-Term Capital Gains Tax Rates
The long-term capital gains tax brackets for 2025 are as follows:
Single Filers:
- 0% — Taxable income up to $48,350
- 15% — Taxable income from $48,351 to $533,400
- 20% — Taxable income over $533,400
Married Filing Jointly:
- 0% — Taxable income up to $96,700
- 15% — Taxable income from $96,701 to $600,050
- 20% — Taxable income over $600,050
Head of Household:
- 0% — Taxable income up to $64,750
- 15% — Taxable income from $64,751 to $566,700
- 20% — Taxable income over $566,700
Note that these brackets apply to your total taxable income, not just the capital gain itself. This means a single filer with $50,000 in total income pays 15% on the portion of their gain that falls above the $48,350 threshold, while the rest is taxed at 0%.
2025 Short-Term Capital Gains Tax Rates (Ordinary Income)
Short-term gains are taxed as ordinary income using these brackets for single filers:
- 10% — Up to $11,925
- 12% — $11,926 to $48,475
- 22% — $48,476 to $103,350
- 24% — $103,351 to $197,300
- 32% — $197,301 to $250,525
- 35% — $250,526 to $626,350
- 37% — Over $626,350
For married filing jointly, the brackets are roughly double these amounts. The calculator uses the appropriate brackets based on your selected filing status.
Net Investment Income Tax (NIIT)
In addition to capital gains tax, high-income taxpayers may owe the 3.8% Net Investment Income Tax (NIIT). This surtax was enacted as part of the Affordable Care Act and applies to the lesser of your net investment income or the amount by which your modified adjusted gross income (MAGI) exceeds these thresholds:
- Single / Head of Household: MAGI over $200,000
- Married Filing Jointly: MAGI over $250,000
- Married Filing Separately: MAGI over $125,000
The NIIT effectively raises the top long-term capital gains rate from 20% to 23.8%, and the top short-term rate from 37% to 40.8%. For taxpayers with significant investment income, this is a substantial additional cost. For example, a single filer with $300,000 in income and a $100,000 long-term capital gain would pay the 15% federal rate ($15,000) plus NIIT on the lesser of $100,000 (investment income) or $100,000 (excess over $200,000 threshold), resulting in an additional $3,800 in NIIT.
State Capital Gains Tax
Most states tax capital gains as ordinary income at the state level, which means your state tax bill can be significant on top of federal tax. Here's how states break down:
States with no income tax (and no capital gains tax): Texas, Florida, Washington, Nevada, Wyoming, Alaska, South Dakota. New Hampshire and Tennessee tax only dividend and interest income, not capital gains from asset sales.
States with the highest capital gains tax rates: California (13.3%), New York (10.9%), New Jersey (10.75%), Hawaii (11%), Oregon (9.9%), Minnesota (9.85%). These states tax capital gains at the same rate as ordinary income, so a large gain can push you into the highest state bracket.
States with moderate rates: Illinois (4.95% flat rate), Pennsylvania (3.07% flat rate), Michigan (4.25% flat rate), Ohio (3.5% effective), North Carolina (4.5% flat rate). Some states like Colorado have a flat tax rate that applies uniformly to all income including capital gains.
For someone with a $100,000 capital gain in California, state tax alone could be $13,300 on top of federal tax. In Texas, the state tax would be $0. This is why many high-income individuals and families consider establishing residency in no-tax states before executing large sales. However, be aware that states like California and New York aggressively audit and pursue former residents who they believe haven't truly moved — you generally need to spend more than 183 days per year in your new state and demonstrate genuine residency.
How to Minimize Capital Gains Tax
- Hold investments for over 1 year — This is the single most impactful strategy. Converting a short-term gain taxed at up to 37% to a long-term gain taxed at 15-20% can save you 17-22 percentage points in federal tax alone.
- Tax-loss harvesting — Sell investments that have lost value to offset your capital gains. You can offset an unlimited amount of gains with losses. If your losses exceed your gains, you can deduct up to $3,000 ($1,500 if married filing separately) against ordinary income per year, with excess losses carrying forward indefinitely.
- Use tax-advantaged accounts — Investments held in 401(k), traditional IRA, and Roth IRA accounts grow tax-deferred or tax-free. In a Roth IRA, qualified withdrawals are completely tax-free, including capital gains. Maxing out these accounts each year should be a priority.
- Donate appreciated assets to charity — Instead of selling stock and donating cash, give the stock directly to a qualified charity. You deduct the full fair market value as a charitable contribution and pay zero capital gains tax on the appreciation. This double benefit is one of the most underused tax strategies.
- Step-up in basis at death — When someone passes away, their heirs receive the assets at the fair market value on the date of death, effectively eliminating all unrealized capital gains that accumulated during the original owner's lifetime. A stock purchased for $10,000 that's worth $500,000 at death gets a stepped-up basis of $500,000 — the heirs can sell immediately with no capital gains tax.
- Qualified Small Business Stock (Section 1202) — If you hold qualified small business stock for more than 5 years, you may be able to exclude up to $10 million (or 10 times your basis, whichever is greater) in capital gains from federal tax. This is a powerful incentive for startup investors and founders.
- Primary residence exclusion — If you've lived in your primary residence for at least 2 of the last 5 years, you can exclude up to $250,000 (single) or $500,000 (married filing jointly) in capital gains from the sale. This exclusion can be used once every two years.
- 1031 exchanges for investment real estate — By reinvesting proceeds from an investment property sale into a similar "like-kind" property within strict time limits, you can defer capital gains tax indefinitely. This is a cornerstone strategy for real estate investors building wealth through property exchanges.