Capital Gains Tax Calculator (Real Estate)

Estimate potential real-estate capital gains tax, depreciation recapture, NIIT, state tax, and after-tax sale proceeds under user-entered assumptions.

The calculator is a planning tool. It does not determine your actual tax liability, correct federal bracket, state-specific tax treatment, Section 121 eligibility, installment-sale treatment, passive loss impact, or 1031 exchange eligibility.

Reviewed by ArvCalc Editorial Team

Last updated: May 2026

This calculator and guide are designed for educational real-estate capital gains tax planning. It estimates adjusted basis, realized gain, depreciation recapture, long-term capital gain, simplified federal capital gains tax, simplified state tax, simplified NIIT, total estimated tax, cash after tax, and tax drag under user-entered assumptions. Results are planning estimates only. They are not tax advice, legal advice, CPA advice, IRS guidance, state tax guidance, investment advice, or a substitute for professional tax review.

Total Tax Est.
fill in fields below

What do you want to calculate?

Enter purchase info, sale details, and tax rates to estimate your total capital gains tax and net cash after tax.

Adjusted Basis

$
$

Closing costs paid at purchase increase your cost basis and reduce your taxable gain.

$

Additions, renovations, and permanent improvements that added value add to your basis.

$

If you don't know accumulated depreciation, estimate it using a depreciation calculator or your tax records. Entering 0 may significantly understate tax.

→ Depreciation Calculator

Sale Details

$
$

Agent commissions, title fees, and other costs reduce your net sale price.

$

Mortgage payoff reduces cash proceeds, not taxable gain. It does not affect the tax calculation.

Tax Rates

%

Typical long-term rates: 0%, 15%, or 20% depending on income. Short-term gains use ordinary income rates (up to 37%).

%

State tax is simplified as a flat rate on total gain. Some states tax capital gains as ordinary income, while others use different rules. This is a rough estimate.

Include NIIT (Net Investment Income Tax)

Adds 3.8% on total gain. NIIT is shown as an upper-bound estimate. Actual NIIT depends on income level and may apply to a smaller portion of gain.

Property Info

Properties held under 1 year are typically taxed as ordinary income (short-term rates).

Enter values above

Purchase price, sale price, and federal rate required

Saved Scenarios

0/20 saved

No saved scenarios yet

Fill in the calculator above, then save your first scenario.

Overview

When a real-estate investment is sold for more than its adjusted basis, the gain may be subject to capital gains tax. Adjusted basis accounts for purchase price, capitalized acquisition costs, capital improvements, and depreciation adjustments.

For rental or investment real estate, depreciation can affect the tax result. The depreciation-related portion may be treated as unrecaptured Section 1250 gain and taxed at a maximum 25% federal rate.

State taxes add another layer. This calculator uses a simplified flat-rate approach for state tax — useful for planning estimates, but not a substitute for state-specific analysis.

High-income taxpayers may owe NIIT. This calculator shows NIIT as an optional simplified estimate. NIIT is generally 3.8% on the lesser of net investment income or MAGI excess over the statutory threshold. The calculator may overstate NIIT in marginal cases.

How to Use the Capital Gains Tax Calculator

  1. 1
    Enter adjusted basis inputs. Enter purchase price, purchase closing costs, capital improvements, and accumulated depreciation. Use tax records, depreciation schedules, and closing statements when available.
  2. 2
    Enter sale details. Enter expected sale price, selling costs, and mortgage payoff. Selling costs reduce net sale price. Mortgage payoff reduces cash proceeds, but it does not reduce taxable gain.
  3. 3
    Enter tax-rate assumptions. Enter the federal capital gains rate, state capital gains rate, and NIIT setting. These are simplified inputs. The calculator does not automatically determine your correct federal bracket, state tax treatment, or NIIT liability.
  4. 4
    Review estimated tax and cash after tax. Review total estimated tax, recapture tax, federal capital gains tax, state tax, simplified NIIT, cash before tax, cash after tax, and tax drag.
  5. 5
    Compare planning scenarios. Use reverse modes to estimate sale price needed for a target after-tax cash amount, or to stress-test different tax-rate assumptions. Treat outputs as planning estimates, not final tax liability.

Pro Tips

  • Use tax records for accumulated depreciation whenever possible.
  • Mortgage payoff affects cash proceeds, not taxable gain.
  • State tax is simplified as a flat user-entered rate; verify state treatment separately.
  • NIIT is simplified and may overstate tax in marginal cases.
  • Use reverse modes for planning, not as a final sale-pricing recommendation.

Inputs & Outputs

FieldTypeDescription
Purchase PriceRequiredOriginal acquisition cost
Purchase Closing CostsOptionalClosing costs at purchase — added to basis
Capital ImprovementsOptionalPermanent value-adding improvements
Accumulated DepreciationOptionalTotal depreciation taken — reduces basis, triggers recapture
Sale PriceRequiredExpected gross sale price
Selling CostsOptionalBroker commissions, title fees — reduces net sale price
Mortgage PayoffOptionalRemaining loan balance — affects cash only, not tax
Federal RateRequiredYour applicable federal capital gains rate (%)
State RateOptionalState capital gains rate — applied as flat rate on total gain
NIIT ToggleOptionalAdds 3.8% NIIT on total gain (upper-bound estimate)
Ownership TypeOptionalInvestment / Primary / Mixed-use — affects warnings shown
Holding PeriodOptionalYears owned — triggers short-term warning if <1 year
Total Est. TaxOutputRecapture + Federal CG + State + NIIT
Cash After TaxOutputNet proceeds after all taxes and mortgage payoff
Tax DragOutputTotal tax as % of cash before tax (drives verdict)
VerdictOutputLow / Moderate / High / Severe / Cash Shortfall

Formula — Step by Step

The capital gains tax calculation for real estate involves five sequential steps. Each step builds on the previous, and skipping any one of them leads to an inaccurate estimate.

Step 1 — Adjusted Basis
Adjusted Basis = Purchase Price + Closing Costs + Improvements − Accumulated Depreciation
Step 2 — Net Sale Price
Net Sale Price = Sale Price − Selling Costs
Step 3 — Total Gain & Split
Total Gain = Net Sale Price − Adjusted Basis
Depreciation Recapture = min(Accumulated Depreciation, Total Gain)
Long-Term Capital Gain = Total Gain − Depreciation Recapture
Step 4 — Tax Calculation
Recapture Tax = Depreciation Recapture × 25%
Federal CG Tax = Long-Term Gain × Federal Rate
State Tax = Total Gain × State Rate (simplified flat rate)
Simplified NIIT (if toggled) = Total Gain × 3.8% — actual NIIT may be lower
Total Tax = Recapture Tax + Federal CG Tax + State Tax + NIIT
Step 5 — Cash Proceeds
Cash Before Tax = Net Sale Price − Mortgage Payoff
Cash After Tax = Cash Before Tax − Total Tax
Tax Drag = Total Tax ÷ Cash Before Tax × 100%

Worked Example — Modeled Real Estate Sale Tax Scenario

Purchase: $300,000 | Improvements: $20,000 | Depreciation: $40,000 | Sale: $480,000 | Selling Costs: $28,800 | Federal Rate: 15% | State Rate: 5%

  • Adjusted Basis: $300,000 + $20,000 − $40,000 = $280,000
  • Net Sale Price: $480,000 − $28,800 = $451,200
  • Total Gain: $451,200 − $280,000 = $171,200
  • Recapture: min($40,000, $171,200) = $40,000 → Tax: $40,000 × 25% = $10,000
  • LTCG: $171,200 − $40,000 = $131,200 → Federal: $131,200 × 15% = $19,680
  • State: $171,200 × 5% = $8,560
  • Total Tax: $10,000 + $19,680 + $8,560 = $38,240
  • Cash After Tax (no mortgage): $451,200 − $38,240 = $412,960

What Is Capital Gains Tax on Real Estate?

Capital gains tax is tax on gain from selling an asset for more than its adjusted basis. For real estate, gain is not usually calculated as sale price minus purchase price only. Adjusted basis may include purchase price, capitalized acquisition costs, capital improvements, and depreciation adjustments.

For rental or investment real estate, depreciation can affect the tax result. The depreciation-related portion may be treated as unrecaptured Section 1250 gain and taxed at a maximum 25% federal rate.

Long-term capital gains generally apply when an asset is held more than one year. Short-term gains are generally taxed as ordinary income. This calculator uses the federal rate entered by the user and does not automatically determine the correct rate.

Long-Term Rates

0% / 15% / 20%

Held > 1 year

Recapture Rate

Up to 25%

On depreciation taken

Short-Term Rates

Ordinary income

Held ≤ 1 year

How to Read Estimated Tax, Cash After Tax and Tax Drag

The result is a modeled tax estimate under the assumptions entered. It should not be treated as final tax liability or a recommendation to sell, hold, exchange, finance, or restructure.

Low Tax Drag

Lower modeled tax drag means estimated tax is a smaller portion of cash before tax. Verify that depreciation, state tax, NIIT, and basis inputs are complete.

Moderate

Moderate modeled tax drag means tax is a meaningful part of the sale economics. Compare after-tax proceeds with the intended use of funds and consult a tax professional if planning strategies are being considered.

High Tax Drag

High modeled tax drag means a larger share of cash before tax is estimated to go to taxes. This may justify reviewing timing, 1031 exchange, installment sale, or other planning options with qualified professionals.

Severe / Cash Shortfall

Very high modeled tax drag or cash shortfall requires closer review of depreciation, basis, mortgage payoff, state tax, NIIT, and available planning options. Do not rely on the calculator alone.

Methodology & Assumptions

The outputs on this page are planning estimates, not tax advice, legal advice, CPA conclusions, IRS guidance, or final tax liability.

  • Adjusted basis is modeled from purchase price, closing costs, improvements, and depreciation
  • Federal rate is user-selected and not auto-determined from income
  • State tax is simplified as a flat rate
  • NIIT is simplified and may overstate tax
  • Section 121 exclusion is not calculated
  • Mixed-use allocation is not modeled
  • Installment sales, passive losses, and entity issues are not modeled

Modeled Capital Gains Tax Planning Scenarios

The scenarios below are illustrative planning references, not tax benchmarks, state tax advice, or typical taxpayer outcomes. Actual tax depends on taxable income, filing status, depreciation, property use, state law, NIIT, passive losses, entity structure, residency, and transaction structure.
Lower modeled tax drag: May occur when basis is high, depreciation is low, state tax is low, mortgage payoff is manageable, or gain is limited.
Moderate modeled tax drag: May occur when the property has meaningful appreciation but limited depreciation and manageable state tax.
Higher modeled tax drag: May occur when accumulated depreciation, state tax, NIIT, or a large gain materially increases estimated tax.
Cash shortfall scenario: May occur when debt payoff and estimated tax exceed net sale proceeds. Verify all inputs and seek professional review.
Primary residence / mixed-use: The calculator does not implement Section 121 exclusion or mixed-use allocation. Results may overstate tax if Section 121 applies.

Federal capital gains brackets change periodically. This calculator uses a user-entered federal rate and does not automatically determine the correct rate from taxable income. Verify the applicable bracket using current IRS guidance or a qualified tax professional.

Strategy and Use Cases

1031 Exchange Review

A 1031 exchange may defer gain recognition when a qualifying investment or business real property is exchanged for like-kind real property. This calculator does not determine 1031 eligibility. Review with a Qualified Intermediary, CPA, and attorney.

Long-Term vs Short-Term Timing

If a property is held one year or less, federal tax treatment may differ from long-term capital gains treatment. The calculator uses the federal rate entered by the user.

Installment Sale Planning

An installment sale may spread some gain recognition over time, but depreciation recapture and state rules can differ. This calculator does not model installment-sale tax timing.

Pre-Sale Cash Planning

Use the calculator to estimate after-tax proceeds before listing, refinancing, exchanging, or reallocating capital. Do not use the result as final tax advice.

Common Use Cases

Pre-sale planning

Estimate potential tax and cash after tax before selling an investment property.

Depreciation impact review

Model how accumulated depreciation may affect recapture and after-tax proceeds.

State tax sensitivity

Run simplified state-rate scenarios, then verify actual state tax treatment with a state-specific CPA.

1031 exchange comparison

Estimate tax if sold outright before evaluating whether a 1031 exchange may be worth professional review.

Reverse sale price planning

Use reverse modes to estimate the sale price needed for a target after-tax cash amount.

Primary residence warning

If the property may qualify for Section 121 exclusion, use this calculator only as a rough screen and review with a tax professional.

Industry Context / IRS References

This page summarizes common U.S. federal tax concepts for real-estate sale planning. It is not affiliated with the IRS and does not provide tax advice.

Useful IRS reference points:

  • IRS Topic 409 explains capital gains and losses and notes that unrecaptured Section 1250 gain from selling Section 1250 real property is taxed at a maximum 25% rate.
  • IRS Topic 559 explains NIIT as 3.8% on the lesser of net investment income or MAGI excess over the statutory threshold.
  • IRS Publication 523 explains the primary residence exclusion rules.

This calculator uses simplified planning logic and does not replace IRS forms, CPA calculations, state tax review, or legal analysis.

Limitations of This Calculator

Simplified federal rate input

The calculator requires the user to enter the federal capital gains rate. It does not automatically determine the correct rate from taxable income.

Simplified state tax

State tax is modeled as a flat user-entered rate. Actual state tax may depend on brackets, ordinary income treatment, deductions, and residency rules.

Simplified NIIT

NIIT is modeled as an upper-bound estimate. Actual NIIT is generally based on the lesser of net investment income or MAGI excess over the statutory threshold.

Section 121 not calculated

The calculator does not calculate the primary residence exclusion. If the property qualifies, actual tax may be lower.

Mixed-use, installment, passive losses

Mixed-use allocation, installment-sale timing, passive activity losses, and entity-level rules are not modeled.

Not professional advice

This calculator is educational only. It is not tax advice, legal advice, CPA advice, IRS guidance, or investment advice.

Common Mistakes When Estimating Capital Gains Tax

  1. Forgetting accumulated depreciation

    Accumulated depreciation reduces basis and may create unrecaptured Section 1250 gain. Use actual depreciation schedules where available.

  2. Assuming mortgage payoff reduces taxable gain

    Mortgage payoff reduces cash proceeds, but taxable gain is generally based on net sale price and adjusted basis.

  3. Using the wrong federal rate

    The correct federal rate depends on taxable income, filing status, holding period, and other income. The calculator uses the rate entered by the user.

  4. Not including capital improvements in basis

    Capital improvements may increase basis. Verify documentation and tax treatment.

  5. Ignoring state tax

    State tax can materially affect the result. Use state-specific guidance rather than a generic rate when possible.

  6. Forgetting NIIT

    High-income taxpayers may owe NIIT, but actual NIIT depends on IRS rules and may apply to less than the full gain.

  7. Using this calculator for primary residence without Section 121 review

    If the property may qualify for the home-sale exclusion, the calculator may overstate tax because Section 121 is not implemented.

Frequently Asked Questions

Disclaimer

This calculator and its outputs are for educational and informational purposes only. Results are planning estimates based on user-entered assumptions and should not be treated as tax advice, legal advice, CPA conclusions, IRS guidance, state tax guidance, or investment advice. Tax rules, state treatment, federal brackets, NIIT, Section 121, Section 1031, and entity-specific rules vary. Consult qualified professionals before acting.