Last updated: October 20, 2026 · Tax year 2026 · By Ahtesham Ahmad · How we calculate
Capital gains tax calculator (2026)
Enter your other income, short-term gains and long-term gains. Long-term gains stack on top of ordinary income, so the rate depends on your total. The calculator shows tax at each rate and the 3.8% net investment income tax when it applies.
How the calculation works
- Ordinary taxable income = wages + short-term gains − deductions. It is taxed at the regular 2026 brackets.
- Long-term gains sit on top of ordinary income. The part below the 0% threshold is untaxed, the next part is taxed at 15% and the part above the 15% threshold at 20%.
- Net investment income tax = 3.8% × the lesser of net investment income and MAGI over $200,000 ($250,000 married filing jointly).
Example. A single filer with $80,000 of wages and $40,000 of long-term gains pays $6,000 of capital gains tax at the 15% rate, and $14,770 in federal tax in total. The 0% rate applies only to taxable income up to $49,450.
One year changes everything
The holding period splits gains into two tax worlds. Sell an asset held one year or less and the gain is short-term: it stacks onto your wages and is taxed at ordinary income rates up to 37%. Hold longer than a year and the gain is long-term, taxed at 0%, 15% or 20% depending on where your taxable income falls - and the 0% band is real, meaning moderate-income filers can pay literally nothing on long-term gains. The boundary is a full year plus a day, and the rate is applied by stacking: ordinary income fills the brackets first and the long-term gain sits on top, so a big gain can push part of itself into a higher capital gains tier. On very high incomes the 3.8% net investment income tax adds on top of the 20% rate.
Losses, homes and the exceptions to know
Capital losses offset capital gains dollar for dollar, and up to $3,000 of net loss per year offsets ordinary income, with the rest carried forward indefinitely - which makes realizing losses in down markets a legitimate strategy, subject to the wash-sale rule that voids the loss if you rebuy the same security within 30 days. Your main home has its own rule: up to $250,000 of gain ($500,000 married filing jointly) is excluded if you owned and lived in it two of the last five years, so most home sales owe nothing. Not everything gets the gentle 0/15/20 treatment: collectibles face up to 28%, and the depreciated part of real estate gain can face up to 25%. State taxes apply on top nearly everywhere, and this page's note lists what it leaves out.
Frequently asked questions
What is the 2026 0% capital gains threshold?
Taxable income up to $49,450 for single filers, $98,900 for married filing jointly and $66,200 for heads of household.
How long must I hold an asset for long-term rates?
More than one year. Assets held a year or less produce short-term gains taxed as ordinary income.
What is the net investment income tax?
A 3.8% tax on investment income for people whose modified AGI is above $200,000 ($250,000 if married filing jointly).
Does this include state tax?
No. Many states tax capital gains as ordinary income. Check your state tax agency.
How long do I need to hold for long-term rates?
More than one year - one year plus at least one day. Sell exactly at one year and the gain is short-term, taxed at ordinary rates. The holding period runs from the day after purchase to the sale date.
Do capital losses reduce my regular income tax?
Up to $3,000 of net capital loss per year offsets ordinary income after first offsetting all capital gains. Any remaining loss carries forward to future years until used up.
Is the sale of my home taxed?
Usually not. If you owned and used it as your main home for at least two of the five years before sale, up to $250,000 of gain is excluded ($500,000 married filing jointly). Only gain above the exclusion is taxed, and this calculator does not apply that exclusion.
Related calculators
Sources
- IRS Revenue Procedure 2025-32 section 3.03: 2026 capital gains rate thresholds
- IRS: net investment income tax
Estimates only, not financial, tax or legal advice. See the methodology page and the disclaimer.
