Tax tool · 2026 rates, 2027 projected

Capital Gains Tax Calculator: What You'll Owe on a Sale

Enter what you sold, what you paid and your other income. See the federal, investment income and state tax on the sale, your rate on the gain, how much fits in the 0% band and what waiting a year would save.

By Work & Money Editorial Team · Last reviewed October 16, 2026 · Calculation tax.capital-gains v1.0.0

Your sale

Including purchase fees and reinvested dividends.

Commissions, agent and closing fees.

Additions and upgrades, not repairs.

Wages and other income before deductions.

Capital gains tax

$4,500 tax on this sale

federal, investment income tax and state, on top of your other income

Estimate · 2026 rules
Federal income tax
$4,500
Net investment income tax (3.8%)
$0
State tax
Choose a state
Effective rate on the gain
15%
You keep (gain after tax)
$25,500
Room left in the 0% band
$0
If held more than a year
Already long-term
Loss to carry forward
None
  • Long-term gains stack on top of your other taxable income: $0 at 0%, $30,000 at 15% and $0 at 20% across all your long-term gains this year.
  • Selling in 2027 instead, with the same income, would mean about $4,500 of tax under the projected 2027 brackets.
  • Collectibles (up to 28%), depreciation recapture on rental or business property (up to 25%), other investment income and the alternative minimum tax aren't included.
How this was calculated

Gain = sale price − selling costs − cost basis (plus improvements for a home). For a home you owned and lived in for 2 of the last 5 years, up to $250,000 ($500,000 married filing jointly) is excluded; a loss on your home isn't deductible. Netting: this sale is combined with your other gains or losses this year (treated as long-term) and any loss carried over; a net loss offsets up to $3,000 of other income ($1,500 married filing separately) and the rest carries forward.

Federal tax is your whole return with and without the sale, using the same engine as our tax bracket calculator: the standard deduction (and the senior deduction at 65+), short-term gains at ordinary rates, long-term gains stacked on top at 0%, 15% and 20%, and the rule that the result can't exceed the regular tax. Net investment income tax: 3.8% of the smaller of your net gains and income over $200,000 ($250,000 joint, $125,000 separate). State: your state's income tax on the gain as extra income, after the state's capital gains deduction where it has one; Washington's capital gains excise tax instead of income tax.

2026 uses IRS figures (Rev. Proc. 2025-32); 2027 uses projections (Thomson Reuters for the capital gains breakpoints, Wolters Kluwer for the brackets). Not included: collectibles (taxed at up to 28%), depreciation recapture on rental or business property (up to 25%), other investment income, the alternative minimum tax and local taxes.

Calculation tax.capital-gains v1.0.0.

Quick answer: how capital gains are taxed

Your gain is the sale price minus what you paid and your selling costs. Held more than a year, it's a long-term gain taxed at 0%, 15% or 20%, depending on your total taxable income. Held a year or less, it's taxed like wages at your ordinary rate, 10% to 37% (IRS Topic 409). Higher earners can owe another 3.8%, and most states tax gains too.

Example: a single filer with $90,000 of wages sells shares for $50,000 that cost $20,000 in 2026. The $30,000 long-term gain costs $4,500 in federal tax (15% of the gain). Sold within a year, it would be $6,600. With only $40,000 of wages, most of the gain falls in the 0% band and the tax is $668.

Capital gains tax rates for 2026 and 2027

The rates depend on taxable income (after deductions), including the gain itself. The 2027 figures are projections until the IRS publishes them.

Long-term capital gains rates by taxable income: 2026 (IRS) and 2027 (projected)
Filing status2026: 0%2026: 15%2026: 20%2027: 0%*2027: 20%*
SingleUp to $49,450$49,450 – $545,500Over $545,500Up to $51,050Over $563,200
Married filing jointlyUp to $98,900$98,900 – $613,700Over $613,700Up to $102,100Over $633,600
Head of householdUp to $66,200$66,200 – $579,600Over $579,600Up to $68,350Over $598,400
Married filing separatelyUp to $49,450$49,450 – $306,850Over $306,850Up to $51,050Over $316,800

2026: Rev. Proc. 2025-32. 2027*: Thomson Reuters projection; the 15% rate covers the range between the 0% and 20% thresholds. A qualifying surviving spouse uses the joint amounts. Short-term gains use the ordinary brackets: see the tax bracket calculator and the 2027 tax brackets.

How your gain is stacked on your other income

Your wages and other ordinary income fill the brackets first; long-term gains sit on top. Only the part of the gain that lands above each threshold pays the higher rate. That's why the same gain can be taxed at 0% for one person and 15% or 20% for another, and why a big gain can be taxed at more than one rate (IRC §1(h)).

Example: single, $180,000 of wages and a $100,000 long-term gain in 2026: the federal tax on the sale is $15,000 plus $3,040 of net investment income tax, 18% of the gain. To see which ordinary bracket you're in first, use the tax bracket calculator.

Short-term vs long-term: the one-year line

Long-term means held more than one year: count from the day after you bought and include the day you sell (IRS). Shares bought on March 10, 2026 become long-term if sold on or after March 11, 2027. Inherited property is always long-term, and its basis is generally the value at the date of death (IRC §1014). Gifts generally keep the giver's basis and holding period.

In the example above, waiting past the one-year mark saves $2,100. The calculator's "If held more than a year" row shows the saving for your numbers.

The 3.8% net investment income tax

On top of the capital gains rate, a 3.8% tax applies to the smaller of your net investment income (gains, dividends, interest, rents) and your modified AGI above $200,000 single or head of household, $250,000 married filing jointly or $125,000 married filing separately (IRS). The thresholds aren't adjusted for inflation, so more people pay it each year. The excluded part of a home-sale gain isn't subject to it.

Capital losses: offset, $3,000 and carryover

Losses first offset gains of the same kind (short-term against short-term, long-term against long-term), then the other kind. If you still have a net loss, up to $3,000 a year ($1,500 married filing separately) comes off your other income (§1211), and the rest carries forward with no time limit (§1212). Enter other gains or losses and any carryover in the calculator.

Selling at a loss and buying the same or a substantially identical investment within 30 days before or after is a wash sale: the loss is disallowed now and added to the new shares' basis (§1091).

Selling your home: the $250,000 / $500,000 exclusion

If you owned and lived in your main home for at least 2 of the 5 years before the sale, you can exclude up to $250,000 of gain, or $500,000 married filing jointly when both spouses lived there, once every 2 years (IRS Topic 701). Your gain is the sale price minus selling costs and your basis: the purchase price plus improvements (not repairs). A partial exclusion can apply if you moved early for work, health or another unforeseen reason, and depreciation claimed for a home office or rental use after May 6, 1997 is taxed (IRS Pub. 523). These amounts have never been adjusted for inflation; bills to raise them hadn't passed as of October 2026.

Example: a married couple who both lived in the home sells it for $950,000. They bought it for $300,000, spent $40,000 on improvements and paid $50,000 in selling costs, so the gain is $560,000. The first $500,000 is excluded; the other $60,000 is a long-term gain, about $9,000 of federal tax with $150,000 of other income (1.6% of the whole gain). If only one spouse lived there, the exclusion is $250,000. A loss on your own home isn't deductible.

Collectibles and rental property

Gains on collectibles (art, coins, precious metals, including many gold and silver funds) are taxed at your ordinary rate but no more than 28%. The part of a gain on rental or business real estate that comes from depreciation ("unrecaptured section 1250 gain") is taxed at no more than 25% (IRC §1(h)). This calculator doesn't model those; treat its result as a minimum for them.

State taxes on capital gains

Most states tax capital gains as ordinary income. A few give long-term gains a break, and Washington, which has no income tax, has a separate capital gains tax (WA DOR).

State treatment of capital gains (2026)
StateTreatmentSource
WashingtonNo income tax; 7% on long-term gains above $278,000 (2025 deduction), 9.9% above $1 million; real estate exemptWA DOR
ArizonaArizona subtracts 25% of net long-term gains (assets bought after 2011).Tax Foundation
ArkansasArkansas taxes half of net long-term gains (the exemption for gains above $10 million isn't modeled).Tax Foundation
HawaiiHawaii caps the rate on long-term gains at 7.25%.Tax Foundation
MissouriMissouri lets individuals deduct 100% of capital gains from 2025.MO DOR
MassachusettsMassachusetts taxes short-term gains at 8.5% and long-term gains at its regular 5% (collectibles 12%, not modeled), plus a 4% surtax on income over about $1.1 million.Mass. DOR
MontanaMontana taxes long-term gains at 3.0% up to its bracket break and 4.1% above, instead of its regular rates (estimated using federal taxable income).MT DOR
New JerseyNew Jersey doesn't let a net capital loss offset other income.Tax Foundation
New MexicoNew Mexico deducts up to $2,500 of capital gains (a larger deduction applies only to selling a New Mexico business).Tax Foundation
PennsylvaniaPennsylvania doesn't let a net capital loss offset other income.Tax Foundation
North DakotaNorth Dakota excludes 40% of net long-term gains.Tax Foundation
South CarolinaSouth Carolina deducts 44% of net long-term gains.Tax Foundation
VermontVermont excludes up to $5,000 of long-term gains (a 40% exclusion applies to some assets held over 3 years, not stocks or homes).VT Department of Taxes
WisconsinWisconsin deducts 30% of net long-term gains.Tax Foundation
Alaska, Florida, Nevada, New Hampshire, South Dakota, Tennessee, Texas, WyomingNo tax on capital gains—
All other states and DCTaxed as ordinary income at the state's rates—

Minnesota adds 1% on investment income over $1 million, and Massachusetts has a 4% surtax on income over about $1.1 million. State rules change often; check your state's tax department before a large sale.

How to lower capital gains tax

  • Hold for more than a year before selling a winner.
  • Use the 0% band: in a low-income year (between jobs, early retirement), realize gains up to the 0% limit. The calculator's "room left in the 0% band" shows how much.
  • Harvest losses to offset gains, avoiding wash sales; the year-end money checklist has the December 31 deadline.
  • Spread a big sale across two tax years to stay in a lower band.
  • Lower taxable income with pre-tax 401(k) or HSA contributions, which can pull more of a gain into a lower band.
  • Give appreciated shares to charity instead of cash, or hold them: heirs get a stepped-up basis.
  • Invest through retirement accounts, where trades aren't taxed.

Expecting a big gain? You may owe estimated tax on a large gain.

Common questions

How much tax will I pay on a stock sale?

It depends on how long you held it and your total income. Long-term gains are taxed at 0%, 15% or 20%; short-term gains at your ordinary rate (10% to 37%). Enter your numbers in the calculator for the federal, investment income and state tax.

Do capital gains push me into a higher tax bracket?

Long-term gains don't change the rate on your wages, but they're stacked on top of your other income, so a large gain can be taxed partly at 15% and partly at 20%, and can trigger the 3.8% investment income tax. Short-term gains are ordinary income and can move you into a higher bracket. The tax bracket calculator shows your ordinary bracket.

What is the 0% capital gains bracket for 2026?

Taxable income up to $49,450 single, $98,900 married filing jointly and $66,200 head of household, including the gain.

Do I pay capital gains tax if I reinvest the money?

Yes, in general: reinvesting doesn't defer the tax on a sale in a taxable account. The exceptions are special rules such as real estate swaps under section 1031 and investing gains in a qualified opportunity zone fund.

Do I pay capital gains tax when I sell my house?

Not on the first $250,000 of gain ($500,000 married filing jointly) if you owned and lived in it 2 of the last 5 years. Gain above that is taxed as a long-term gain.

How are crypto gains taxed?

Like stocks: selling, swapping or spending crypto is a sale, and the gain is short- or long-term depending on how long you held it.

Sources

  1. Revenue Procedure 2025-32 (2026 inflation adjustments) — Internal Revenue Service. Accessed October 16, 2026.
  2. Key 2027 figures calculated by Thomson Reuters Checkpoint — Thomson Reuters. Accessed October 16, 2026. 2027 capital gains breakpoints (projection).
  3. Topic no. 409, Capital gains and losses — Internal Revenue Service. Accessed October 16, 2026.
  4. 26 U.S. Code § 1(h), Maximum capital gains rate — Legal Information Institute, Cornell Law School. Accessed October 16, 2026.
  5. Net Investment Income Tax — Internal Revenue Service. Accessed October 16, 2026.
  6. 26 U.S. Code § 1211, Limitation on capital losses — Legal Information Institute, Cornell Law School. Accessed October 16, 2026.
  7. 26 U.S. Code § 1212, Capital loss carrybacks and carryovers — Legal Information Institute, Cornell Law School. Accessed October 16, 2026.
  8. 26 U.S. Code § 1091, Wash sales — Legal Information Institute, Cornell Law School. Accessed October 16, 2026.
  9. 26 U.S. Code § 1014, Basis of property acquired from a decedent — Legal Information Institute, Cornell Law School. Accessed October 16, 2026.
  10. Topic no. 701, Sale of your home — Internal Revenue Service. Accessed October 16, 2026.
  11. Publication 523, Selling Your Home — Internal Revenue Service. Accessed October 16, 2026.
  12. New tiered rates for Washington's capital gains tax — Washington State Department of Revenue. Accessed October 16, 2026.
  13. Capital gains tax — Washington State Department of Revenue. Accessed October 16, 2026.
  14. Capital gains deduction for individuals (HB 594) — Missouri Department of Revenue. Accessed October 16, 2026.
  15. HB 337 income tax changes — Montana Department of Revenue. Accessed October 16, 2026.
  16. Massachusetts tax rates — Massachusetts Department of Revenue. Accessed October 16, 2026.
  17. Instructions for Form IN-153, Capital Gain Exclusion — Vermont Department of Taxes. Accessed October 16, 2026.
  18. State capital gains tax rates (2024) — Tax Foundation. Accessed October 16, 2026. State exclusions and deductions.

Research checked October 16, 2026. This is an estimate, not tax advice.