Capital gains tax calculator
Estimate the tax on selling stocks, funds or your home, and see how much a longer holding period could save.
Your sale
What you paid, plus improvements.
Commissions, agent fees, closing costs.
Your taxable income without this sale, after deductions.
How your gain is split across rate bands
Enter a sale above to see how much of the gain falls in each long-term rate band.
2026 long-term capital gains rates by filing status
These rates apply to taxable income, which includes the gain itself, after deductions.
| Filing status | 0% up to | 15% up to | 20% above |
|---|---|---|---|
| Single | $49,450 | $545,500 | $545,500 |
| Married filing jointly | $98,900 | $613,700 | $613,700 |
| Married filing separately | $49,450 | $306,850 | $306,850 |
| Head of household | $66,200 | $579,600 | $579,600 |
Source: IRS Revenue Procedure 2025-32. The Net Investment Income Tax adds 3.8% when income is over $200,000 (single or head of household), $250,000 (married filing jointly) or $125,000 (married filing separately).
Rough sheet
step-by-stepHow this capital gains tax calculator works
A capital gain is the difference between what you sold an asset for and what it cost you, after selling costs. How that gain is taxed depends on how long you owned the asset. A gain on something held one year or less is short-term and is taxed at your ordinary income tax rates. A gain on something held longer than a year is long-term and is taxed at 0%, 15% or 20%, depending on your taxable income and filing status. The calculator adds your gain on top of your other taxable income, so you can see which rate band the gain lands in. It also estimates the 3.8% Net Investment Income Tax and any state tax you enter.
A worked example
Suppose you are single, you bought shares for $30,000, and you sell them for $80,000 after holding them for more than a year. Your other taxable income is $60,000. Your gain is $50,000. For 2026, the 0% rate ends at $49,450 of taxable income, so your income is already past it, and the whole $50,000 falls in the 15% band. The federal tax is $7,500, which is 15% of the gain. If you had held the shares for a year or less, the same gain would be taxed as ordinary income and the federal tax would be $11,086, so the longer holding period saves $3,586.
Why your other income matters
The long-term brackets are based on total taxable income, not on the gain alone. A gain can be split across bands. For example, a single filer with $30,000 of other taxable income and a $50,000 gain has $19,450 of the gain in the 0% band and the remaining $30,550 in the 15% band, for a tax of $4,582.50. Enter your taxable income without the sale, which means your income after the standard or itemized deduction.
Selling your home
If the home was your main home for at least two of the last five years, you can exclude up to $250,000 of gain from tax, or $500,000 if you are married and file jointly. Choose Primary home and the calculator applies that exclusion before working out the tax on any gain left over. Gains on a second home, a rental property or land do not qualify. Selling a rental can also trigger depreciation recapture, which is taxed at up to 25% and is not modeled here.
Losses and what this calculator leaves out
If you sell at a loss, no capital gains tax is due. The loss first offsets other capital gains in the same year, and up to $3,000 of what is left can reduce ordinary income. The rest carries over to future years. This calculator treats each sale on its own. It does not model collectibles, which can be taxed at up to 28%, qualified small business stock, the wash-sale rule, or the alternative minimum tax. For a full-year estimate that includes your wages and credits, see the Federal Income Tax Calculator.
Frequently asked questions
Common questions about how this capital gains tax calculator works.
Long-term gains on assets held more than a year are taxed at 0%, 15% or 20%. A single filer pays 0% up to $49,450 of taxable income, 15% up to $545,500 and 20% above that. Short-term gains are taxed at ordinary income rates from 10% to 37%. High earners can also owe the 3.8% Net Investment Income Tax.
Legal ways to reduce it include holding assets longer than a year, selling in a year when your income is low enough to use the 0% band, offsetting gains with losses, and using the home sale exclusion for a main home. Gains inside a retirement account such as an IRA or 401(k) are not taxed when you sell. Rules vary by situation, so check with a tax professional for large sales.
Your cost basis is what you paid for the asset, plus costs that add to its value such as home improvements or purchase commissions. Your gain is the sale price minus your basis and minus selling costs. Your broker's year-end statement usually shows the basis for stocks and funds.
Only if you enter a rate. Many states tax capital gains as regular income, a few have special rates, and some have no income tax. Enter your state's rate in the state tax box to include it in the total.
It is a 3.8% federal tax on investment income, including capital gains, when your modified adjusted gross income is over $200,000 for single filers, $250,000 for married couples filing jointly or $125,000 for married filing separately. It applies to the lesser of your investment income or the amount over the threshold. This calculator estimates your income from the taxable income you enter, plus the standard deduction and the gain.