Capital gains tax is the tax you owe on the profit from selling an asset — stocks, crypto, real estate, a business, even collectibles — for more than you paid. The US federal system rewards patience: assets you held for more than one year qualify for long-term rates of 0%, 15%, or 20%, while assets held for one year or less are taxed as ordinary income at rates up to 37%. That single line — the one-year mark — can easily be the difference between a 15% and a 32% tax bill on the same profit.
This free calculator stacks your gain on top of your other taxable income, then walks it through the 2026 brackets to find the federal tax you would owe. It also adds the 3.8% Net Investment Income Tax (NIIT) for higher earners and an optional state tax rate, so the final number reflects the real check you would write. Enter the sale price, your cost basis (what you paid, including fees and commissions), choose short-term or long-term, and get your estimate instantly.
Timing matters as much as the numbers: selling in a lower-income year can drop part of your gain into the 0% bracket, and spreading a large sale across two tax years can keep you under a bracket threshold. Use the estimates here to plan before you sell — not to discover the tax bill after.
How to use the Capital Gains Tax Calculator
- Enter the sale price — what you sold (or will sell) the asset for, in dollars.
- Enter your cost basis — what you originally paid, including purchase fees and commissions.
- Choose the holding period — long-term (more than 1 year) or short-term (1 year or less).
- Select your filing status and other taxable income — this determines which tax bracket your gain lands in.
- Add your state tax rate if your state taxes capital gains (enter 0 for states with no income tax).
- Click Estimate my tax to see your taxable gain, federal tax, NIIT, state tax, and net proceeds.
Ways to legally reduce your capital gains tax
- Hold assets for more than one year to unlock the 0%/15%/20% long-term rates.
- Use tax-loss harvesting: sell losing investments to offset winning ones.
- Time big sales into a lower-income year to keep gains in the 0% or 15% bracket.
- Contribute to pre-tax retirement accounts to lower the income your gain stacks onto.
Short-term vs. long-term capital gains: why it matters
Short-term gains are added straight to your ordinary income and taxed at your marginal rate — the same rate as your salary. Long-term gains get their own preferential brackets (0%, 15%, 20%), which are almost always lower. For a single filer earning $90,000, a $30,000 short-term gain is taxed at 24%, while the same gain held long-term is mostly taxed at 15%. Crossing the one-year anniversary of your purchase date is one of the simplest tax moves in investing.
Frequently asked questions
What is the capital gains tax rate in 2026?
Long-term capital gains (held more than one year) are taxed at 0%, 15%, or 20% federally, depending on your taxable income. Short-term gains are taxed as ordinary income (10%–37%). An extra 3.8% Net Investment Income Tax applies to investment income above $200,000 (single) or $250,000 (married filing jointly).
How is capital gains tax calculated?
Taxable gain = sale price minus cost basis. Long-term gains are stacked on top of your other taxable income and taxed at the 0%/15%/20% brackets as they cross each threshold. Short-term gains are taxed at your marginal ordinary-income rate. Add state tax where applicable.
What is the difference between short-term and long-term capital gains?
Assets held one year or less produce short-term gains taxed as ordinary income. Assets held more than one year produce long-term gains at the lower 0%, 15%, or 20% rates. Crossing the one-year line can cut your tax rate substantially.
Do I pay capital gains tax on my home sale?
You can exclude up to $250,000 of gain ($500,000 married filing jointly) on a primary residence you owned and lived in for at least two of the last five years. Enter the gain after subtracting any exclusion into this calculator.
Does this calculator include state capital gains tax?
Yes — enter your state's capital gains or income tax rate (most states tax gains as ordinary income) and it is added to the federal estimate. States like Texas, Florida, and Washington have no state income tax, so enter 0.