Tax & Income

Capital Gains Tax Calculator

See how much tax you’ll owe on a sale of stocks, funds, crypto or other property, or on selling your home. The estimate uses the official 2026 long-term rate thresholds, the 3.8% net investment income tax and your state’s income tax.

Your numbers

What did you sell?
$

What you paid, plus fees. For a home, add improvements.

$

After commissions and selling costs.

How long you owned it
$

Wages and other ordinary income before deductions. We subtract the standard deduction.

Your 2026 capital gains tax

Tax on this sale

$3,631

On a $15,000 long-term gain, filing as single in California.

Effective rate on the gain

24.2%

Federal and state

Top capital gains rate

15%

Federal 0/15/20% rates

  • Sale price$35,000
  • Cost basis−$20,000
  • Taxable long-term gain$15,000
  • Federal capital gains tax$2,250
  • California income tax$1,381
  • Total tax$3,631
  • You keep$11,369

How your gain is taxed: 2026 federal rates

RateTaxable income rangeYour gain taxedTax
0%Up to $49,450$0$0
15%$49,451 – $545,500$15,000$2,250
20%Over $545,500$0$0
Total$15,000$2,250

How to use this calculator

  1. What you sold. Stocks & assets covers shares, funds, crypto, collectibles held as investments and other property. My home adds the home sale exclusion.
  2. Purchase price is your cost basis: what you paid plus commissions and fees. For a home, add the cost of improvements.
  3. Sale price is what you received, after commissions and selling costs.
  4. How long you owned it. More than one year is long-term; one year or less is short-term.
  5. 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.
  6. 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

Gain=Sale price−Cost basis Tax=0%×G0+15%×G15+20%×G20+3.8%×NIIT base

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

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.