Taxstra Logo
Free Capital Gains Tool

Capital Gains Tax Calculator

See what a sale actually costs: the 0/15/20 stack, the 3.8% surtax, depreciation recapture, and state tax, in one honest number.

Quick Answer

Long-term gains are taxed at 0%, 15%, or 20%, but not at one flat rate: your gain stacks on top of your other income, so slices of the same sale can be taxed at different rates. High earners add the 3.8% NIIT, rental sellers add up to 25% depreciation recapture, and short-term gains skip the discount entirely. This calculator does the stacking for you. It is the same math we run (in more detail) before any client sells something big.

Your Numbers

Example figures, replace with yours

$

Sale price minus your cost basis (and selling costs).

$

Wages, business, retirement income, everything except this gain.

Most states tax gains as ordinary income; nine states tax none.

$

Selling a rental? Total depreciation taken, taxed separately at up to 25%.

Federal math uses 2026 long-term capital gains breakpoints, the 2026 standard deduction, and official 2026 ordinary brackets for short-term gains. Recapture simplified to a flat 25%. Estimates only. A sale this size deserves a real projection.

Estimated Total Tax on This Gain

$70,705

28.3% effective rate · You keep $179,295

Federal Tax on the Gain

$85,900 taxed at 15%$12,885
$104,100 taxed at 20%$20,820
Depreciation recapture (25%)$15,000
Federal Subtotal$48,705

Surtaxes & State

Net investment income tax (3.8%)$9,500
State tax (at your rate)$12,500
Total Tax$70,705

Selling this year? Discuss our tax services.

Timing, 1031 exchanges, installment sales, and loss harvesting only work if they are planned before the closing.

Book your free 30-minute tax fit call to talk through your next steps.

Tax planning slots are limited before year-end.

Worked example

A $250,000 gain on a rental sold by a married couple with $500,000 of other income

A married couple filing jointly sells a rental they held for more than a year. The gain is $250,000, and $60,000 of it is depreciation they claimed while they owned it. They have $500,000 of other income and live in a state that taxes the gain at a flat 5%.

Inputs

Worked example inputs
Capital gain from the sale$250,000
Other annual income$500,000
Filing statusMarried filing jointly
Holding periodOver 1 year
State tax rate5%
Depreciation claimed$60,000

Calculator output

Worked example calculator output
$85,900 taxed at 15%$12,885
$104,100 taxed at 20%$20,820
Depreciation recapture at 25%$15,000
Net investment income tax (3.8%)$9,500
State tax at 5%$12,500
Estimated total tax on this gain$70,705
Effective rate28.3%
You keep$179,295

Ordinary taxable income is $467,800 after the $32,200 standard deduction. The $60,000 of depreciation is taxed at 25%, then the other $190,000 stacks on top and crosses the $613,700 breakpoint, so part is taxed at 15% and part at 20%. Income plus the gain is far above the $250,000 NIIT threshold, so the whole gain picks up 3.8%.

Methodology

How this calculator works

The calculator stacks the gain on top of your other income and reports the federal capital gains tax, depreciation recapture, NIIT and state tax caused by the gain.

Formulas

  • Ordinary taxable income = other income minus the 2026 standard deduction ($16,100 single, $32,200 married filing jointly).
  • Long-term: depreciation claimed (up to the gain) is taxed at 25%. The rest of the gain is stacked above ordinary taxable income plus that depreciation and taxed by slice at 0%, 15% and 20% (2026 breakpoints $49,450 and $545,500 single, $98,900 and $613,700 married filing jointly).
  • Short-term: tax on ordinary taxable income plus the gain, minus tax on ordinary taxable income alone, using the 2026 ordinary brackets.
  • NIIT = 3.8% x the lesser of the gain or (other income + gain) minus $200,000 single or $250,000 married filing jointly.
  • State tax = gain x the state rate you enter (capped at 20%). Effective rate = total tax / gain.

Assumptions

  • Other income is ordinary income and you take the standard deduction.
  • MAGI for NIIT is approximated as other income plus the gain, and the whole gain is net investment income.
  • Your state taxes the whole gain at the single rate you enter.

What it ignores

  • The lower ordinary rate on depreciation recapture when your bracket is under 25%, and section 1245 recapture on personal property.
  • Head of household and married filing separately status, itemized deductions, capital losses and carryovers, and qualified dividends.
  • The home sale exclusion, 1031 exchanges, installment sales, QSBS, AMT and local taxes.

Sources

Primary sources

  1. IRS Rev. Proc. 2025-32: 2026 inflation adjustments: 2026 capital gains breakpoints (section 3.03), ordinary brackets (3.01) and standard deduction (3.14)
  2. 26 U.S. Code Section 1: tax imposed, including section 1(h): 0%, 15% and 20% capital gains rates and the 25% maximum on unrecaptured section 1250 gain
  3. 26 U.S. Code Section 1222: short-term and long-term gains: the more-than-one-year holding period
  4. 26 U.S. Code Section 1411: net investment income tax: 3.8% rate and the $200,000 and $250,000 thresholds
  5. 26 U.S. Code Section 1016: adjustments to basis: basis is reduced by depreciation allowed or allowable
  6. Instructions for Schedule D (Form 1040): unrecaptured section 1250 gain worksheet and the capital gains tax worksheets
  7. Instructions for Form 8960: net investment income tax: what counts as net investment income and MAGI
  8. IRS Topic 409: capital gains and losses
  9. IRS Publication 544: sales and other dispositions of assets: depreciation recapture on real property

Educational, not individualized tax advice.

How Capital Gains Tax Actually Works

The mistake almost everyone makes is applying one flat rate to the whole gain. In reality your gain stacks on top of your ordinary income: income fills the brackets from the bottom, and each slice of the gain is taxed at whichever rate (0%, 15%, or 20%) applies at that height. That's why the breakdown above can show the same sale split across multiple rates, and why the identical gain costs a retiree nothing and an executive 23.8%. The full mechanics, with worked examples, are in our 2026 capital gains brackets guide.

Selling investment real estate adds two layers this tool models simply: depreciation recapture at up to 25%, and, if you'd rather not pay at all, the option to defer everything under the 1031 exchange rules. Selling a business is its own animal (purchase-price allocation, QSBS, installment structuring). See capital gains on a business sale. And if the sale is big enough to move your bracket, it also moves your estimated tax payments for the year, the IRS expects its share in the quarter you sell, not next April.

Key Insight

The cheapest tax planning happens before the sale closes

Once the transaction settles, your options collapse to 'pay it.' Before closing, timing shifts, installment terms, loss harvesting, charitable stock gifts, and exchange structures are all on the table. If this calculator shows a number that hurts, that's the signal to model it properly.

Selling property or a business? Plan before closing.

This calculator estimates the tax on a sale that has already happened. Which tax year the gain lands in, installment terms, or a 1031 exchange generally have to be set up before closing. Book a free 30-minute consultation with our team to talk through your sale and whether Taxstra is a fit. See our tax services for high-income earners.

Tax planning slots are limited before year-end.

2026 Capital Gains Tax Brackets

These are the 2026 long-term capital gains breakpoints the calculator uses. The rate applies to the slice of gain that lands in each band of taxable income, not to the whole gain at once.

Rate0%
Single (taxable income)Up to $49,450
Married filing jointlyUp to $98,900
Rate15%
Single (taxable income)$49,451 to $545,500
Married filing jointly$98,901 to $613,700
Rate20%
Single (taxable income)Above $545,500
Married filing jointlyAbove $613,700
Rate+3.8% NIIT
Single (taxable income)MAGI above $200,000
Married filing jointlyMAGI above $250,000

Short-term gains (assets held one year or less) skip these brackets entirely and are taxed at ordinary income rates up to 37%. Depreciation claimed on a rental comes back separately at up to 25% when you sell.

Common Questions

How much is capital gains tax in 2026?

Long-term capital gains (assets held over one year) are taxed at 0%, 15%, or 20% based on taxable income: 0% up to $49,450 single / $98,900 married filing jointly, 15% up to $545,500 / $613,700, and 20% above that. Add the 3.8% net investment income tax above $200K/$250K of MAGI. Short-term gains are taxed as ordinary income, up to 37%.

How does this calculator figure the tax on my gain?

It stacks your long-term gain on top of your other taxable income, the way the tax code actually works. Your ordinary income fills the brackets first; each slice of the gain is then taxed at the capital-gains rate that applies at that height (some at 0%, some at 15%, and so on), plus the 3.8% NIIT where your income crosses the threshold.

Why is part of my gain taxed at 0%?

If your ordinary taxable income sits below the 0% breakpoint, the gap between your income and that breakpoint gets filled by your gain tax-free. A married couple with $70,000 of taxable income has almost $29,000 of 0% capacity in 2026. This is real and intentional: retirees and gap-year sellers use it to harvest gains for free.

How do I calculate capital gains tax on the sale of a rental property?

Start with the sale price minus selling costs. Subtract your adjusted basis: what you paid, plus improvements, minus the depreciation you took or were allowed to take. The part of the gain equal to that depreciation is taxed at up to 25%; the rest uses the 0%, 15%, or 20% long-term rates after stacking on your other income. The 3.8% NIIT can apply on top, and most states tax the gain too. Enter the gain and the depreciation claimed above to see each piece.

What is depreciation recapture on a rental property sale?

Depreciation you claimed while owning a rental reduces your basis, and at sale that portion of the gain, 'unrecaptured Section 1250 gain', is taxed at up to 25% instead of the normal capital-gains rates. Selling a property you depreciated for ten years can produce a five-figure recapture bill on top of the regular gain, which is why exit modeling belongs in the plan before you list.

Does the net investment income tax apply to my sale?

If your modified AGI (roughly, your income including the gain) exceeds $200,000 single or $250,000 married filing jointly, the 3.8% NIIT applies to the lesser of your net investment income or the amount over the threshold. A large sale routinely drags otherwise-exempt households over the line for that one year.

How can I reduce the capital gains tax on a sale?

The main levers: hold past one year for the lower brackets, time the sale into a lower-income year, harvest losses to offset the gain, use an installment sale to spread the income, exchange investment real estate under Section 1031, use the Section 121 exclusion on a primary residence, and donate appreciated shares instead of cash. The right combination depends on your numbers, which is exactly what a planning engagement models.

Selling this year? Discuss our tax services.

We model the federal stack, NIIT, recapture, state tax, and the estimated-payment plan, then find the structure that fits the sale. Book a free 30-minute tax fit call before you sign anything.

Tax planning slots are limited before year-end.

Timing, 1031 exchanges, installment sales, and loss harvesting only work if they are planned before the closing.

Related Taxstra resources

Continue with the services, planning tools, and explainers most relevant to this topic.