Skip to main content
Interactive Tools

Capital Gains Tax on Real Estate Calculator

Capital gains tax on real estate calculator: work out your gain, depreciation recapture, NIIT and state tax on a property sale in all 50 states.

Capital gains tax on a property sale is charged on the gain, not on the sale price, and the gain is what most people get wrong. Start from the net proceeds, subtract your adjusted basis — purchase price plus capital improvements, minus every dollar of depreciation you claimed — and the difference is the gain. Depreciation is then taxed back first, at up to 25%, before the remainder is taxed at the long-term rate of 0%, 15% or 20%. Add 3.8% NIIT above the income thresholds, then state tax.

Adjusted basis = Purchase price + Improvements − Depreciation claimed Gain = (Sale price − Selling costs) − Adjusted basis Tax = (Depreciation × up to 25%) + (Remaining gain × 0/15/20%) + NIIT + State

The figures below are an estimate for educational purposes. Confirm your own numbers with your CPA or tax adviser before acting; individual circumstances vary.

Estimated total tax

Estimate for educational purposes only, based on the figures below. Confirm your own numbers with your CPA or tax advisor before acting.

Property Sale Details

Enter the numbers from your sale. The calculator works out your gain, then separates depreciation recapture from the rest.

Your Estimated Tax

Total Gain
Taxable Gain
Net After Tax
Adjusted basis
§121 home-sale exclusion
Depreciation recapture (25%)
Federal capital gains
Net Investment Income Tax (3.8%)
State tax
Total estimated tax
Effective rate on the gain

This is an educational estimate, not tax advice. It uses current federal long-term and ordinary brackets, the 3.8% Net Investment Income Tax thresholds, the 25% ceiling on unrecaptured §1250 gain, and a single flat top rate for state income tax. It does not model the alternative minimum tax, suspended passive losses, instalment sales, partial-year residency, local income taxes, or state-specific treatment of capital gains. In Primary Home mode it assumes the property was never rented and never carried a home-office deduction — if you converted a rental to a residence, or claimed depreciation on part of the home, that depreciation is still recaptured and the §121 exclusion does not cover it. Individual circumstances vary — confirm your own numbers with your tax and legal advisers before acting.

Why a Property Sale Is Not a Simple Capital Gain

On a share of stock the arithmetic is short: sale price minus what you paid. Real estate has three complications that change the answer materially, and a general capital gains calculator will not catch any of them.

  1. Your basis moved while you owned the property. Capital improvements — a new roof, an addition, a full kitchen — raise it. Depreciation lowers it. After twenty years of ownership the number you paid and the number the tax code says it cost you can be very far apart.
  2. Depreciation is taxed back at a different rate. Gain attributable to depreciation you claimed is unrecaptured §1250 gain, taxed at up to 25% — not at the 15% or 20% long-term rate that applies to the rest. It is taxed first, off the top.
  3. Selling costs come out before the gain is measured. Commission, title, and closing costs reduce the amount realised, which is why they belong in the calculation rather than being treated as a separate expense afterwards.

Put together, an owner who expects to pay “15% on the profit” on a long-held rental routinely finds the effective rate on the gain is materially higher once recapture, NIIT and state tax are counted.

A Worked Example

Take a rental bought for $350,000, improved by $40,000, depreciated by $150,000 over the holding period, and sold for $900,000 with $54,000 of selling costs. Those are the figures the calculator above loads by default, so you can see each step:

  • Adjusted basis = $350,000 + $40,000 − $150,000 = $240,000
  • Net proceeds = $900,000 − $54,000 = $846,000
  • Total gain = $846,000 − $240,000 = $606,000

That gain then splits. The $150,000 of depreciation is recaptured at up to 25%; the remaining $456,000 is taxed at the long-term rate set by total taxable income; the 3.8% NIIT applies to the extent modified adjusted gross income exceeds the threshold; and state tax, if any, applies to the whole taxable gain. Change the state in the calculator to see how much of the result is geography rather than arithmetic.

Primary Residence vs Investment Property

Switch the calculator to Primary Home and the picture changes. Under §121, gain on a home that was your main residence for at least two of the last five years can generally be excluded up to $250,000, or $500,000 for a married couple filing jointly. Gain above the exclusion is taxed as a long-term capital gain in the normal way.

Investment property does not qualify for that exclusion. This is the single largest fork in the calculation, and it is why the tool asks which one you are selling before anything else.

If the Tax Result Is Larger Than Expected

There are recognised approaches for deferring or reducing tax on a property sale, and which — if any — is appropriate depends entirely on your circumstances:

  • 1031 exchange — defer the gain by reinvesting the proceeds in like-kind investment property within the statutory deadlines.
  • Opportunity Zone funds — defer and potentially reduce tax by reinvesting the gain into a qualified fund.
  • Instalment sale — spread the gain, and therefore the tax, across more than one tax year.
  • Timing — the long-term rate depends on total taxable income in the year of sale, so the year in which a sale closes can matter.

These are categories of strategy, described here for education. None is a recommendation, none suits every investor, and each carries its own risks, costs and eligibility requirements.

Grace Capital Management, LLC is an SEC Registered Investment Adviser. Securities offered through Concorde Investment Services, LLC, member FINRA/SIPC — separate and unaffiliated entities. This page is educational and is not investment, tax, or legal advice. Tax rules change and individual circumstances vary; confirm any figure with your own tax and legal advisers.

Frequently Asked Questions

Common Questions

How do you calculate capital gains tax on real estate?
Take your sale price, subtract selling costs such as commission and closing fees, then subtract your adjusted basis. Adjusted basis is what you paid, plus capital improvements, minus all depreciation you claimed while you owned it. The result is your gain. On investment property the depreciation portion is taxed back first at up to 25%, and the rest is taxed at long-term capital gains rates of 0%, 15% or 20% if you held the property more than a year. The 3.8% Net Investment Income Tax and any state income tax apply on top.
Do I pay capital gains tax when I sell a rental property?
Generally yes. Investment property does not qualify for the §121 principal-residence exclusion, so the full gain is exposed. It is also the case that depreciation you claimed — or were entitled to claim — reduces your basis and comes back as unrecaptured §1250 gain at up to 25%, which frequently makes the bill larger than owners expect. A 1031 exchange is one recognised way to defer that tax by reinvesting in like-kind property; whether it suits your situation is a question for your own advisers.
How much capital gains tax will I pay on a house sale?
It depends on your gain, how long you held the property, your other taxable income, your filing status, and your state. If the property was your main home for at least two of the last five years, you can generally exclude up to $250,000 of gain, or $500,000 filing jointly, before any tax applies. Enter your own figures in the calculator on this page for an estimate.
What is depreciation recapture and why does it increase my bill?
Every year you own a rental you deduct depreciation, which lowers your taxable income at the time. Those deductions also lower your cost basis. When you sell, the depreciation you took is ‘recaptured’ — taxed at a rate of up to 25% rather than the lower long-term capital gains rate. On a property held for many years this can be a substantial share of the total tax. See our depreciation recapture calculator for a detailed walkthrough.
Does the calculator include state tax?
Yes. It applies a single flat top-rate figure for each of the 50 states, which is the right order of magnitude for planning but not a substitute for a state return. Texas, Florida, Nevada, Washington, Wyoming, South Dakota, Tennessee and Alaska have no state income tax on capital gains — Texas sellers can see what the 0% state rate still leaves them owing federally.

Stay Informed

Get tax strategies, market insights, and investment updates delivered to your inbox.

By subscribing, you agree to receive email communications from Grace Capital Management. You can unsubscribe at any time. Privacy Policy

Access Your Free Guide

These investments are speculative, illiquid, and involve risk including possible loss of principal; they are available only to verified accredited investors. Distributions are not guaranteed.

By submitting, you agree to be contacted by Grace Capital Management. We do not sell your information; form submissions are processed by our forms provider.