How to use this calculator
- What you sold. Stocks & assets covers shares, funds, crypto, collectibles held as investments and other property. My home adds the home sale exclusion.
- Purchase price is your cost basis: what you paid plus commissions and fees. For a home, add the cost of improvements.
- Sale price is what you received, after commissions and selling costs.
- How long you owned it. More than one year is long-term; one year or less is short-term.
- For a home, say whether you owned and lived there for 2 of the last 5 years. If you had to move early for a job, health or an unforeseeable event, choose No, but moved and enter the months.
- Filing status, state and other income. Enter wages and other ordinary income for the year; the standard deduction is applied for you.
The result shows the total tax the sale adds to your 2026 return, split into federal capital gains tax, the 3.8% NIIT and state tax, with a table of how much of your gain falls in each federal rate.
How capital gains tax works
Long-term gains sit on top of your ordinary taxable income. The part of the gain that fits under the 0% threshold is tax-free, the next part is taxed at 15%, and anything above the 20% threshold at 20%. Short-term gains are simply added to your ordinary income.
2026 long-term capital gains brackets
| Rate | Single | Married filing jointly | Head of household | Married filing separately |
|---|---|---|---|---|
| 0% | Up to $49,450 | Up to $98,900 | Up to $66,200 | Up to $49,450 |
| 15% | $49,451 – $545,500 | $98,901 – $613,700 | $66,201 – $579,600 | $49,451 – $306,850 |
| 20% | Over $545,500 | Over $613,700 | Over $579,600 | Over $306,850 |
Thresholds are taxable income, including the gain. Qualified dividends use the same rates.
Worked examples
Stock sale. A single filer in California with $80,000 of wages sells shares bought for $20,000 for $35,000 after more than a year. The $15,000 gain all falls in the 15% bracket: $2,250 federal. California taxes it as ordinary income, about $1,381. Total: $3,631, leaving $11,369. Sold within a year, the federal tax would be $3,300 at the 22% rate, $1,050 more.
Home sale. A married couple in California bought their home for $300,000 and sell it for $900,000 after living there 10 years. They exclude $500,000 of the $600,000 gain. On the remaining $100,000, with $200,000 of other income, federal tax is $15,000, the 3.8% NIIT adds $1,900 (their income is $50,000 over the $250,000 threshold), and California about $9,300.
Early move. A single homeowner relocates for a new job after 18 months. The exclusion is prorated to 18/24 of $250,000, or $187,500. On a $200,000 gain, $12,500 is taxable: $1,875 at 15% with $90,000 of other income in a state without income tax.
Washington. A single filer in Washington with $300,000 of wages has a $500,000 long-term stock gain. Federal tax is $86,920, NIIT $19,000, and Washington’s capital gains tax 7% of the gain above the $278,000 deduction, $15,540.
Federal tax on a $20,000 long-term gain
Single filer, standard deduction, no state tax.
| Other income | Long-term (held over 1 year) | Short-term (1 year or less) |
|---|---|---|
| $30,000 | $0 | $2,400 |
| $50,000 | $668 | $2,750 |
| $65,000 | $2,918 | $4,250 |
| $100,000 | $3,000 | $4,400 |
| $250,000 | $3,760 | $7,160 |
| $600,000 | $4,760 | $7,760 |
From $250,000 the figures include the 3.8% NIIT. Waiting past the one-year mark saves between about $1,300 and $3,400 here.
Ways to lower capital gains tax
- Hold for more than a year before selling whenever you can.
- Harvest losses. Selling losing positions offsets gains, and up to $3,000 of extra loss offsets other income. Watch the wash-sale rule if you buy the same investment back within 30 days.
- Time sales for low-income years. In a year with lower income, more of your gain may fall in the 0% bracket.
- Use tax-advantaged accounts. Gains inside a 401(k) or IRA aren’t taxed when you sell; see the investment calculator to compare.
- Keep home improvement records. Improvements add to your basis and shrink any taxable gain on a home sale.
Assumptions & limitations
- Tax year 2026: brackets and capital gains thresholds from Rev. Proc. 2025-32; NIIT thresholds from IRC §1411.
- One sale is added to your other income, treated as wages. Other gains, losses, qualified dividends and loss carryovers aren’t included; your income tax calculator result covers ordinary income.
- The 28% rate on collectibles and the 25% rate on unrecaptured depreciation (rental or business use of a home) aren’t modeled. Depreciation claimed after May 6, 1997 can’t be excluded under the home sale rules.
- The home exclusion assumes no exclusion in the prior 2 years; joint filers get $500,000 only if both spouses meet the use test. The partial exclusion is prorated on the full maximum.
- State tax treats the gain as ordinary income, without state-specific capital gains exclusions or local taxes. Washington’s 2026 deduction hadn’t been published, so the 2025 figure of $278,000 is used.
Sources
- IRS Revenue Procedure 2025-32, §4.03: 2026 maximum capital gains rate amounts
- IRS Topic 409: Capital gains and losses
- IRS Topic 559: Net investment income tax
- IRS Topic 701: Sale of your home
- IRS Publication 523: Selling Your Home
- Washington Department of Revenue: Capital gains tax
- Washington Department of Revenue: New tiered rates for capital gains tax
This estimate is for planning only and isn’t tax advice. Your actual tax depends on your complete return.
Frequently asked questions
What are the 2026 long-term capital gains tax rates?
Long-term gains are taxed at 0%, 15% or 20%, depending on your taxable income. For 2026 the 0% rate applies up to $49,450 of taxable income for single filers ($98,900 joint, $66,200 head of household), and the 20% rate starts above $545,500 ($613,700 joint, $579,600 head of household).
How are short-term capital gains taxed?
Gains on assets you held one year or less are taxed as ordinary income at your regular bracket rate, from 10% to 37%. Holding an investment for more than a year before selling can cut the federal tax on the gain substantially.
What is the net investment income tax?
It’s an extra 3.8% on investment income, including capital gains, for people with modified adjusted gross income over $200,000 ($250,000 joint, $125,000 married filing separately). It applies to the smaller of your investment income or the amount you’re over the threshold. The thresholds aren’t adjusted for inflation.
Do I pay capital gains tax when I sell my house?
Usually not, if you owned and lived in it as your main home for at least two of the five years before the sale. You can exclude up to $250,000 of gain, or $500,000 on a joint return. Gain above that is taxed as a capital gain, and the taxable part can also owe the 3.8% NIIT.
Can I deduct a capital loss?
Capital losses first offset capital gains. If losses are larger, you can deduct up to $3,000 a year ($1,500 if married filing separately) against other income and carry the rest forward with no time limit. A loss on your own home isn’t deductible.
Do states tax capital gains?
Most states with an income tax tax capital gains as ordinary income. Some give long-term gains a partial exclusion or a lower rate. Washington has no income tax but taxes long-term gains over its standard deduction at 7%, rising to 9.9% on gains over $1 million; real estate is exempt.
Updated November 2026. Results are estimates for educational purposes and depend on the inputs you provide.