Skip to main content
US · Capital Gains Tax

US capital gains calculator

Federal long-term (0/15/20%) and short-term rates, the 3.8% NIIT surcharge, the §121 primary-residence exclusion and your state's add-on — plus what you actually net after every tax.

Property details

Over 1 year → long-term rates. One year or less → short-term.

Excludes up to $250k single / $500k MFJ if you lived in it 2 of the last 5 years.

Tax profile

Determines which 0% / 15% / 20% band the gain lands in.

LTCG taxed as ordinary income; top 13.3% (excludes 1.1% SDI on wages).

Total tax due
$30,564
28.3% of the gain.
Net to you
$298,436
After sale costs + all taxes · long-term.
Taxable gain
$108,000
Raw gain $108,000.
Federal CGT
$16,200
NIIT (3.8%)
$0
State tax
$14,364
Adjusted basis
$221,000

What this means for you

  • TIPTotal tax of $30,564 is about 28% of your $108,000 gain. After sale costs and all taxes you keep $298,436.
  • TIPAs a rental (not a primary residence) you can't use the §121 exclusion. If you'd lived in it 2 of the last 5 years, up to $250,000 of this gain could have been excluded — worth structuring around if you're close to qualifying.
  • WINHeld over a year, so this is taxed at the lower long-term rates (0/15/20%) rather than your ordinary-income rate.
  • TIPIf this was a rental, the IRS also taxes prior depreciation you claimed at a separate 25% recapture rate (§1250) — not included above. Size it with the depreciation calculator, or defer the whole gain with a 1031 exchange.
US capital gains
Tax = (Gain − §121) × (Federal rate + NIIT + State)
Gain = sale price − sale costs − (purchase + costs + improvements). Long-term gains (held > 1 year) use the 0/15/20% bands; the 3.8% NIIT stacks on top above the income threshold, plus your state's rate. Selling a rental? Prior depreciation is recaptured separately at 25% (§1250) — not modelled here.

Selling a rental? This excludes depreciation recapture.

Prior depreciation you deducted is taxed at a separate 25% recapture rate under §1250 — commonly $20–50k of extra tax on a 10-year hold, not shown above. Size it with the Depreciation Calculator or defer the whole gain with a 1031 exchange.

Not tax advice. US tax law is complex — depreciation recapture, state-specific rules, AMT and investor-status classifications can change the outcome. Use this for planning, not filing.

Common questions

What's a long-term vs short-term capital gain?

If you hold the property for more than one year before selling, the profit is taxed at the lower long-term capital gains rates (0%, 15%, or 20% federal). Held one year or less, it's short-term and taxed at ordinary income rates (up to 37% federal).

What is the Section 121 exclusion?

If the property was your primary residence for at least 2 of the last 5 years, you can exclude up to $250,000 ($500,000 married filing jointly) of the gain from federal tax. Rental-only properties don't qualify.

What is NIIT?

The Net Investment Income Tax adds a 3.8% surcharge on investment income (including capital gains) when your modified adjusted gross income exceeds $200k single / $250k MFJ / $125k MFS. It was introduced in 2013 and the thresholds are not inflation-indexed.

What costs can I deduct from the sale price?

Purchase costs (closing fees, title insurance, survey), sale costs (agent commission, closing fees, transfer tax), and capital improvements that add value or extend useful life (new roof, addition, not repainting). Keep all records — IRS can ask.

Do I pay state taxes on the gain too?

Most states tax capital gains as ordinary income. Nine states (AK, FL, NV, NH, SD, TN, TX, WA, WY) don't have state income tax, though Washington now taxes long-term CGT above a threshold. Always confirm with a CPA — municipal taxes may also apply.

Can I defer the tax with a 1031 exchange?

Like-kind exchanges (IRC §1031) let you defer capital gains on investment property if you reinvest in 'like-kind' real estate within strict timelines (45 days to identify, 180 days to close). Primary residences don't qualify. See a 1031 intermediary.