Free Tool

Capital Gains Tax Calculator

How much capital gains tax will you owe on your home sale? Handles the Section 121 primary-residence exclusion, depreciation recapture, and federal long-term vs short-term rates.

Property type

Section 121 exclusion only applies to a primary residence meeting the 2-out-of-5 rule.

$

Your other taxable income — used to set your long-term capital gains bracket.

Sale details

$
$

Commissions + closing costs + concessions. Reduces taxable gain.

Short-term gains are taxed at ordinary income rates (much higher).

Cost basis

$
$

Additions, renovations, new roof, HVAC replacement. Adds to basis. NOT regular repairs.

$

Total depreciation claimed on Schedule E over rental years. Subtracts from basis, recaptured at 25%.

State tax (optional)

0% in TX, FL, TN, WA, NV, SD, WY, AK. Up to 13.3% in CA. Check your state.

Tax estimate

Total tax owed (federal + state)

$0

Effective rate on gain: —

After-tax proceeds

$0

Sale price − selling costs − total tax

Calculation breakdown

  • Amount realized (sale − costs)
  • Adjusted cost basis
  • Total gain
  • Section 121 exclusion
  • Depreciation recapture (25%)
  • Taxable capital gain
  • Federal cap gains rate
  • Federal tax
  • State tax
· Enter sale price and basis to see your estimated tax.

Math, not advice. This is an estimate for planning, not a tax return. Doesn't include NIIT (3.8% surtax on high earners), AMT interactions, partial Section 121 for unforeseen circumstances, or state-specific rules. For high-stakes sales, work with a CPA.

Capital gains tax FAQ

How is capital gain on a home sale calculated?

Capital gain = sale price − selling costs − adjusted cost basis. Adjusted cost basis = original purchase price + capital improvements (additions, renovations, new roof, etc.) − depreciation taken (if used as a rental). Selling costs include agent commissions, closing costs, and any seller-paid concessions. The result is your gross gain before any exclusions.

What is the Section 121 exclusion?

IRS Section 121 lets primary-residence sellers exclude up to $250,000 of capital gain (single) or $500,000 (married filing jointly) from federal taxes — if they owned AND lived in the home for at least 2 of the last 5 years (the "2-out-of-5" rule). You can use this exclusion once every 2 years. For most owner-occupied home sales, this exclusion wipes out the entire tax bill.

Are capital gains taxed at the long-term or short-term rate?

Long-term (held more than 1 year): 0%, 15%, or 20% depending on your total taxable income. Short-term (held 1 year or less): taxed as ordinary income — same as your wage tax bracket, up to 37%. For most homeowners selling after several years, the long-term rate applies. Hold for less than a year, and the tax bill jumps significantly.

What is depreciation recapture?

If you rented the home (or claimed home-office deductions), you took depreciation against the property each year. When you sell, the IRS "recaptures" that depreciation by taxing it at a flat 25% — regardless of your income bracket. This is separate from capital gains tax and is not eligible for the Section 121 exclusion. A common surprise for accidental landlords who didn't track this.

Does this calculator include state taxes?

Only federal taxes. State capital gains tax varies widely — 0% in states like Texas, Florida, Tennessee, and Washington (no state income tax); up to 13.3% in California. We added a "state tax rate" field so you can estimate, but check your specific state's rules or talk to a CPA.

What about a 1031 exchange?

For investment properties only (not primary residences): you can defer the entire capital gain by reinvesting proceeds into another investment property within strict deadlines (45 days to identify, 180 days to close). The original gain is deferred, not eliminated — you owe it eventually, but you can keep deferring through repeated 1031s. Has technical rules — consult a qualified intermediary.

What's NOT in this calculator?

Net Investment Income Tax (NIIT, 3.8% on certain investment income above MAGI thresholds), Alternative Minimum Tax interactions, state-specific quirks, partial exclusion rules for unforeseen circumstances (job change, health, etc.), inherited basis step-up details, and timing strategies. This is a planning tool — file with a CPA for high-stakes situations.

Need to sell fast? Get a cash offer.

If timing matters more than maximizing sale price, a cash offer closes in 7-21 days. No agent fees to subtract from your gain.

Get My Cash Offer