Capital Gains Tax Calculator
Capital gains are taxed differently depending on how long you held the asset. Short-term gains (≤1 year) are taxed as ordinary income (up to 37%). Long-term gains (>1 year) are taxed at 0%, 15%, or 20%. The difference can be worth thousands of dollars on a single sale.
Enter your sale price, cost basis, income, and holding period to see exactly how much tax you owe — and what you'd save by holding longer.
2026 Capital Gains Tax Rates
The IRS taxes capital gains at different rates based on your total income and how long you held the asset. Long-term rates (for assets held more than one year) are significantly lower than short-term rates, creating a strong incentive to hold investments for at least one year and one day before selling.
| Rate | Single | Married Filing Jointly | Head of Household |
|---|---|---|---|
| 0% | Up to $47,025 | Up to $94,050 | Up to $63,000 |
| 15% | $47,026–$518,900 | $94,051–$583,750 | $63,001–$551,350 |
| 20% | Over $518,900 | Over $583,750 | Over $551,350 |
Short-term capital gains are taxed as ordinary income at the same rate as wages — ranging from 10% to 37% depending on your total taxable income. For someone in the 24% bracket, selling a stock held 11 months and selling the same stock held 13 months means the difference between 24% and 15% tax — on a $15,000 gain, that's $1,350 in additional taxes for two months of impatience.
The Net Investment Income Tax (NIIT)
High-income investors owe an additional 3.8% Net Investment Income Tax on the lesser of net investment income or the amount by which modified AGI exceeds $200,000 (single) or $250,000 (married). This pushes the effective long-term rate to 18.8% (15% + 3.8%) or 23.8% (20% + 3.8%) for affected taxpayers. This calculator includes the NIIT where applicable.
Tax-Loss Harvesting: Offsetting Gains
If you have other investments that have declined in value, selling them at a loss can offset your gains and reduce your capital gains tax bill. Capital losses first offset capital gains of the same type (short-term losses against short-term gains, then long-term), then net losses can offset up to $3,000 of ordinary income per year. Excess losses carry forward indefinitely. This strategy is most valuable in taxable brokerage accounts — losses in tax-deferred accounts don't generate harvestable losses.
For strategies on reducing capital gains taxes through account placement and harvesting, see our guide on tax-efficient investing. For a complete explanation of how capital gains taxes work including inherited assets and specific identification, read capital gains tax explained.
Frequently Asked Questions
What is the long-term capital gains tax rate for 2026?
0% if your taxable income is under $47,025 (single) or $94,050 (married). 15% up to $518,900 (single) or $583,750 (married). 20% above those thresholds. An additional 3.8% Net Investment Income Tax applies for high earners (over $200K single, $250K married). Short-term gains are taxed at your ordinary income rate (10%–37%).
What's the difference between short-term and long-term capital gains?
Short-term: sold within 1 year, taxed as ordinary income (10%–37%). Long-term: sold after more than 1 year, taxed at preferential rates (0%, 15%, or 20%). Holding an investment one extra day past the 1-year mark can significantly reduce your tax bill on the same gain.
How is capital gain calculated?
Capital gain = Sale price − Cost basis. Cost basis includes what you paid plus commissions/fees. If you bought $10,000 of stock and sold for $25,000, your gain is $15,000. For inherited assets, basis steps up to fair market value at date of death. For gifted assets, you typically use the donor's original basis.
What is tax-loss harvesting?
Selling investments at a loss to offset capital gains and reduce tax. Losses offset same-type gains first, then cross-type, then up to $3,000 of ordinary income annually. Excess losses carry forward indefinitely. Key rule: don't buy a substantially identical investment within 30 days before or after the sale (wash-sale rule), or the loss is disallowed.
Do I owe capital gains tax in my 401k or IRA?
No. Investment gains inside tax-deferred (traditional 401k/IRA) or tax-exempt (Roth) accounts are not subject to capital gains tax when you sell within the account. You only owe tax on traditional account withdrawals (as ordinary income) or nothing on qualified Roth withdrawals. Capital gains tax applies only to assets in taxable brokerage accounts.
Related Calculators