How to use the capital gains tax calculator
- Choose your filing status and enter your other income for the year, such as wages. The calculator subtracts the 2026 standard deduction for you.
- Enter what you paid, including buying fees (your cost basis).
- Enter what you sold for, minus selling fees or commissions.
- Pick how long you held it. More than one year counts as long-term.
- Read the tax, the effective rate on your gain, and what the other holding period would have cost.
Short-term vs. long-term capital gains
The holding period decides which set of rates you pay. Own an asset for one year or less and the profit is a short-term gain, taxed at your ordinary income rates (10% up to 37%). Hold it for more than one year and it's a long-term gain, taxed at 0%, 15% or 20%.
Which long-term rate you pay depends on your total taxable income, with the gain stacked on top of your other income. For 2026:
| Rate | Single | Married jointly | Head of household |
|---|---|---|---|
| 0% | Up to $49,450 | Up to $98,900 | Up to $66,200 |
| 15% | $49,451 to $545,500 | $98,901 to $613,700 | $66,201 to $579,600 |
| 20% | Over $545,500 | Over $613,700 | Over $579,600 |
Worked example
A single filer earns $70,000 in wages and sells shares bought for $20,000 at $35,000, a $15,000 gain held for three years.
- Ordinary taxable income: $70,000 − $16,100 = $53,900. That's already past the $49,450 top of the 0% band.
- So the whole $15,000 gain lands in the 15% band: $2,250 of tax.
Had the shares been sold after eight months, the gain would sit on top of the $53,900 in the 22% bracket, costing $3,300. Waiting past the one-year mark saved about $1,050.
Things that change the bill
- Cost basis. Add purchase fees and, for property, the cost of improvements. A higher basis means a smaller gain.
- Losses. Losses from other sales offset gains in the same year.
- Net investment income tax. An extra 3.8% applies to investment income for people with modified AGI above $200,000 (single) or $250,000 (married filing jointly). These thresholds aren't adjusted for inflation, so more people cross them each year.
- Selling your home. Some or all of the gain on a main home can be excluded if you meet the ownership and use rules. This calculator doesn't apply that exclusion.
- Collectibles and real estate depreciation have their own rates and aren't modeled here.
- State tax. Most states tax capital gains as regular income. Not included.
See all the bands side by side on the 2026 tax brackets page, or estimate your whole year with the income tax calculator.
Frequently asked questions
How is capital gains tax calculated?
Subtract your cost basis from the sale price to get the gain. Short-term gains are taxed as ordinary income; long-term gains get 0%, 15% or 20% depending on your total taxable income.
What is the capital gains tax rate for 2026?
Long-term rates are 0%, 15% and 20%. For single filers the 0% rate applies up to $49,450 of taxable income and 20% starts above $545,500.
How long do I need to hold to pay long-term capital gains tax?
More than one year from the day after you bought it to the day you sell.
Does this work as a crypto capital gains tax calculator?
Yes. The IRS treats crypto as property, so the same short-term and long-term rules apply. Enter your cost basis and sale proceeds.
Can I use it for selling a house?
You can, but it doesn't apply the home sale exclusion that many owners qualify for, so it may overstate the tax on a main home.
Do I pay capital gains tax if I reinvest?
Generally yes, in a regular taxable account. Selling triggers the tax even if you buy something else with the money. Retirement accounts work differently.
What is the 3.8% tax on capital gains?
The net investment income tax. It applies on top of capital gains rates when modified AGI is above $200,000 for single filers or $250,000 for married couples filing jointly.
Related guides
- Short-term vs. long-term capital gainsWhy holding past one year can cut the tax on a sale, and how gains stack on income.
- Marginal vs. effective tax rateWhy being in the 22% bracket doesn't mean you pay 22%, with a worked example.
- How to calculate ROIThe ROI formula, annualized ROI, and the mistakes that make ROI look better than it is.
Related tools
Income tax calculator
Estimate your 2026 federal income tax, refund or balance due, with the bracket math shown.
Retirement calculator
See what your savings could grow to and the monthly income it might pay.
ROI calculator
Return on investment as a percentage, plus the annualized return over time.
2026 tax brackets
Every 2026 federal bracket, plus a finder that shows which bracket you're in.
See everything in Calculators →
More free calculators, same plain working
Every DoesWhat calculator shows how it got the answer, runs in your browser and never asks for an email.