Capital gains tax calculator

Estimate your federal capital gains tax on an investment sale. Enter your purchase and sale price, holding period, income and filing status to see the tax owed.

✓ 100% free✓ No signup✓ Instant results
Capital gains tax owed
Capital gain
Effective tax rate on gain
Net proceeds after tax
Last updated: July 2026Source: IRS 2025 federal tax brackets

Short-term vs long-term capital gains

When you sell an investment for more than you paid, the profit is a capital gain. How that gain is taxed depends entirely on how long you held the asset. If you held it for less than one year before selling, the gain is short-term and is taxed as ordinary income, at the same marginal rate that applies to your salary or other earnings. If you held it for one year or more, the gain is long-term and qualifies for preferential rates that are almost always lower.

This gap exists on purpose. Tax policy has long favored longer holding periods because it discourages short-term speculation and rewards investors who commit capital for a longer stretch of time. The difference between short-term and long-term rates can be substantial: a high earner in the 35% ordinary bracket might pay just 15% or 20% on the same dollar of profit simply by waiting past the one-year mark before selling. That single decision, timing the sale, is one of the few completely legal ways to change your tax bill without changing the investment itself.

2025 long-term capital gains tax brackets

For 2025, long-term capital gains are taxed at three flat federal rates based on your total taxable income, including the gain itself. For single filers, the 0% rate applies up to about $48,350 of total taxable income, the 15% rate applies from there up to about $533,400, and the 20% rate applies above that. For married couples filing jointly, the 0% rate applies up to about $96,700, the 15% rate applies from there up to about $600,050, and the 20% rate applies above that.

This calculator uses a simplified version of these rules: it looks at your ordinary income plus the gain to find which of the three brackets you land in, then applies that single flat rate to the entire gain. The real IRS worksheet stacks gains on top of ordinary income more precisely and can split a gain across two brackets, but the simplified approach used here matches what most online calculators show and is close enough for planning purposes.

How short-term gains stack on your income

Short-term gains don't get their own rate. Instead, they stack on top of your other taxable income and get taxed at whatever marginal bracket that stacking pushes you into, one bracket at a time, not a single flat rate on the whole gain. Only the portion of income that falls inside each bracket is taxed at that bracket's rate.

For example, take a single filer with $50,000 of other taxable income who sells an asset held eight months for a $20,000 short-term gain. Their income without the gain already fills the 10%, 12% and part of the 22% brackets. The $20,000 gain stacks on top, filling the rest of the 22% bracket up to $103,350 and then spilling into the 24% bracket for the remainder. Each slice of the gain is taxed at the rate for the bracket it falls into, which is why short-term gains often end up taxed noticeably higher than long-term gains on the same profit.

Ways to reduce capital gains tax

A few legitimate strategies can lower what you owe. The simplest is holding an asset for over a year before selling, which shifts the gain from ordinary income rates to the lower long-term rates. Tax-loss harvesting is another common approach: selling positions that are currently at a loss to offset gains elsewhere in your portfolio, reducing your total taxable gain for the year.

Investing through tax-advantaged accounts also helps. Gains inside a Roth IRA are never taxed at all, since contributions are made with after-tax dollars and withdrawals in retirement are tax-free, see our Roth IRA calculator to see how that growth adds up. Traditional IRAs and 401(k)s defer the tax instead of eliminating it. If the asset in question is your primary home, there's also a separate exclusion of up to $250,000 in gain for single filers or $500,000 for married couples filing jointly, though eligibility depends on ownership and residency rules not covered by this calculator.

Frequently asked questions

What is the difference between short-term and long-term capital gains?

Short-term applies to assets held under one year and is taxed at your ordinary income tax rate. Long-term applies to assets held one year or more and is taxed at the lower preferential rates of 0%, 15% or 20%, depending on your income.

Can capital losses offset capital gains?

Yes. Capital losses are not taxed and can be used to offset capital gains elsewhere in your portfolio, and up to $3,000 of net losses can offset ordinary income each year, with any remainder carried forward to future years.

Do states also tax capital gains?

Most states tax capital gains as regular income on top of the federal tax shown here. This calculator covers federal tax only, so your total tax bill will usually be higher if you live in a state with income tax.

How does the 0% long-term capital gains bracket work?

If your total taxable income, including the gain, stays under about $48,350 as a single filer or $96,700 married filing jointly, your long-term capital gains are taxed at 0% federally. This helps lower earners and retirees keep more of their investment gains.

Is this calculator accurate for my exact tax bill?

It's a simplified estimate using 2025 federal bracket thresholds. It does not account for the net investment income tax, state taxes, itemized deductions or other credits, so treat the result as a planning estimate rather than a final figure.

This calculator provides estimates for information only, not tax advice. Capital gains tax rules are complex and depend on your full tax situation, state of residence and filing details. Consult a qualified tax professional before making investment or tax decisions.