Capital Gains Tax Calculator
Estimate the federal tax on your profit from selling stocks, crypto, real estate or other investments.
2026 Long-Term Rates
| Rate | Single | Married joint |
|---|---|---|
| 0% | up to $49,450 | up to $98,900 |
| 15% | up to $545,500 | up to $613,700 |
| 20% | above | above |
Thresholds are taxable income including the gain. Confirm current figures with the IRS before filing.
How capital gains tax is calculated
Tax = Gain × Applicable rate (+ 3.8% NIIT if it applies) + State tax
Cost basis is what you paid, plus purchase fees and, for property, the cost of improvements.
Short-term vs. long-term gains
Assets held for one year or less produce short-term gains, taxed at your ordinary income tax rate. Assets held for more than one year produce long-term gains, taxed at 0%, 15% or 20% depending on your taxable income. Holding an investment just past the one-year mark can make a large difference.
Example
A single filer with $80,000 of other taxable income sells shares bought for $20,000 for $35,000 — a $15,000 gain. Held long-term, the whole gain falls in the 15% bracket and the federal tax is $2,250. Held short-term in the 22% bracket, the tax would be about $3,300.
How the 0% / 15% / 20% brackets work
Long-term gains are stacked on top of your other taxable income. If your other income is below the 0% threshold, the part of the gain that fits under the threshold is taxed at 0% and only the remainder at 15%. This calculator applies that stacking automatically.
The 3.8% net investment income tax
An additional 3.8% applies to investment income when modified adjusted gross income exceeds $200,000 (single or head of household) or $250,000 (married filing jointly). It is charged on the smaller of your net investment income or the amount over the threshold.
Ways to reduce capital gains tax
- Hold for more than a year to qualify for long-term rates.
- Offset gains with losses (tax-loss harvesting); up to $3,000 of excess losses can offset ordinary income each year.
- Sell in a year when your income is lower.
- Use tax-advantaged accounts such as IRAs, 401(k)s and HSAs.
- When selling your main home, check the exclusion of up to $250,000 of gain ($500,000 for married couples) if you owned and lived in it for two of the last five years.
This estimate covers federal tax on a single sale and does not handle special cases such as collectibles (28% maximum), depreciation recapture on real estate or the alternative minimum tax. It is not tax advice.