Capital Gains Tax Calculator on Sale of Property

This calculator estimates the federal and state tax you will owe when you sell a house, rental or other real estate. It applies the home sale exclusion, 2026 long-term rates, depreciation recapture and the 3.8% surtax.

Total estimated tax

 

    Total gain (profit)
     
    Home sale exclusion used
     
    Taxable gain
     

    I spent 18 years as a credit union loan officer, and the most common surprise I saw at closing tables was a seller who had forgotten how much they put into the property or how much it cost to sell. Treat the result as an estimate, not tax advice, and confirm the final numbers with the IRS forms or a tax professional.

    How do I use the capital gains tax calculator?

    Fill in the eight fields from your closing statements and last tax return. The result updates as you type, so try a few what-if sale prices.

    • Sale price: the contract price, before any costs come out.
    • Selling costs: agent commissions, title and escrow fees, transfer taxes and legal fees you paid. The seller closing cost calculator can help you total these.
    • Purchase price + improvements: what you paid, plus buying closing costs and permanent upgrades such as a new roof or addition.
    • Depreciation claimed: the total you deducted (or could have deducted) on a rental or home office. Leave it at 0 for a main home that was never rented.
    • Other taxable income: your taxable income for the year without this sale, after deductions.
    • Filing status, property type and state rate: set these to match your situation. Enter 0% for a state with no income tax.

    How is capital gains tax on a property sale calculated?

    The calculator follows the same order as the IRS worksheets. Each step feeds the next, so a small error in your basis carries all the way through.

    1. Sale price minus selling costs gives your amount realized.
    2. Purchase price, buying costs and improvements, minus depreciation, gives your adjusted basis.
    3. Amount realized minus adjusted basis gives your total gain.
    4. For a main home, subtract the exclusion: up to $250,000 single, $500,000 married filing jointly.
    5. Tax any depreciation part at your ordinary rate, capped at 25%. Tax the rest at 0%, 15% or 20%, add the 3.8% surtax if your income is high enough, then add state tax.

    The key detail is stacking. Your gain is treated as sitting on top of your other taxable income, so a big sale can push part of the gain from the 0% rate into 15%, or from 15% into 20%. The calculator splits the gain across those bands for you.

    Worked example: selling a home for $850,000

    These numbers match the calculator defaults. A single filer sells a main home for $850,000 and pays $51,000 in selling costs (6%). They bought it for $300,000 and put in $40,000 of improvements, so the basis is $340,000. Other taxable income is $90,000, and the state rate is 5%.

    Total gain is $850,000 minus $51,000 minus $340,000, which is $459,000. The $250,000 exclusion leaves $209,000 taxable. Because other income already tops $49,450, all of it lands at 15%: $31,350. Income plus gain is $299,000, which is $99,000 over the $200,000 surtax threshold, so the 3.8% surtax applies to $99,000: $3,762. State tax is 5% of $209,000, or $10,450. The total is about $45,562, roughly 10% of the profit.

    Same sale, married filing jointly

    A couple who both meet the use test can exclude up to $500,000. The $459,000 gain is fully excluded, so the federal and state bill drops to $0 (if your state follows the federal exclusion).

    What are the 2026 long-term capital gains rates?

    For 2026, long-term gains are taxed at 0% up to $49,450 of taxable income for single filers, 15% up to $545,500, and 20% above that, with married filing jointly limits of $98,900 and $613,700. These come from the IRS inflation adjustments for 2026 (Rev. Proc. 2025-32).

    Filing status 0% up to 15% up to 20% above
    Single $49,450 $545,500 $545,500
    Married filing jointly $98,900 $613,700 $613,700
    Head of household $66,200 $579,600 $579,600

    Two other rates matter for property. Short-term gains, on property held one year or less, are taxed as ordinary income at rates up to 37%. And the Net Investment Income Tax adds 3.8% on the lesser of your gain or your income over the threshold. That threshold is $200,000 single and $250,000 married filing jointly, and it is not adjusted for inflation.

    Does the home sale exclusion cover my gain?

    You qualify if you owned and used the home as your main home for at least two of the five years before the sale. You generally cannot use it if you excluded gain on another home during the two years before this sale. The two years do not need to be consecutive, and the ownership and use periods can be different stretches.

    Two scenario cards compare single and joint filers' home sale exclusion on a $459,000 gain
    On the same $459,000 gain, a joint limit of $500,000 covers everything, while a single limit leaves $209,000 taxable.

    Several edge cases catch people out. If you fall short of two years because of a job change, health reasons or other unforeseen circumstances, you may get a prorated partial exclusion (live there 12 months, get about half). A surviving spouse keeps the $500,000 limit only if the sale happens within two years of the death. If the home was a rental before you moved in, part of the gain may not qualify. And if you receive a Form 1099-S, you must report the sale even when the gain is excludable.

    How does depreciation recapture work on a rental?

    When you rent out a property, you deduct depreciation each year, which lowers your basis. At sale, that deducted amount comes back as taxable gain. Unrecaptured section 1250 gain is taxed at a maximum 25% rate. The rate is your ordinary bracket, capped at 25%.

    Here is the part people miss: the IRS counts depreciation “allowed or allowable,” so skipping the deduction does not save you. If you were entitled to it, your basis drops anyway. The same rule applies to depreciation on a home office, and the exclusion cannot shelter it. For a full picture of a rental’s returns, the investment property calculator is a good companion.

    What changes the tax bill the most?

    Your basis does more than any other input. Every documented dollar of improvements or buying costs cuts the gain by a dollar, and at a 15% to 23.8% federal rate plus state tax, that is worth 20 to 35 cents each. In my loan officer days I saw sellers lose thousands by trusting memory instead of receipts.

    The second biggest lever is your other income. The same $100,000 gain can be taxed at 0% on part of it in a low-income year, or at 15% plus the surtax in a high-income year. The third is property type, because a main home gets the exclusion and a rental does not.

    Try this: Run the calculator three times with your real numbers: once as entered, once with $20,000 more in improvements (if you can document them), and once with other income $30,000 lower. Compare the totals to see which lever is worth chasing.

    How can I lower the tax on a property sale?

    Most savings come from planning before the sale, not after. These are the moves I would check first.

    • Gather records for improvements, purchase closing costs and prior depreciation before you list.
    • Hold investment property more than one year before selling, so the long-term rates apply.
    • Time the sale for a year when your other income is lower, if you have flexibility.
    • Use capital losses from other investments to offset the gain.
    • For investment property, ask about a 1031 exchange or an installment sale, which defer or spread the gain.
    • If you inherited the property, its basis is generally reset to its value at the date of death, which can erase most of the gain. The estate tax calculator covers the related rules.

    Gifted property works differently: you usually take the giver’s original basis, so the gain can be large. Property transferred to a spouse in a divorce is generally not taxed at the time of transfer.

    What about state tax, and what is left out?

    Most states tax property gains as ordinary income. California has no special rate for capital gains, so you can see the effect with the California income tax calculator, and the New York income tax calculator does the same for New York. In states with no income tax on wages, such as the ones the Texas income tax calculator and Florida tax calculator cover, set the state rate to 0%. Some states have separate real estate transfer taxes, so check your state revenue department.

    This estimate assumes a long-term gain, treats your other taxable income as a stand-in for the surtax income measure, and does not model capital losses, the alternative minimum tax, installment sales or foreign sellers. If you owe tax with no withholding, you may need to make an estimated payment; the tax underpayment penalty calculator shows what missing it can cost. To see how much cash you actually walk away with, use the home sale profit calculator. For final figures, check IRS Publication 523 and Form 8949.

    Capital Gains Tax Calculator on Sale of Property: common questions

    How much is capital gains tax on the sale of a property?

    For property you held more than a year, the federal rate is 0%, 15% or 20% depending on your taxable income, plus a 3.8% surtax for higher earners and any state tax. If it is your main home, the first $250,000 of gain ($500,000 for married couples filing jointly) may be excluded entirely.

    Do I pay capital gains tax if I sell my house and buy another one?

    Buying another home does not defer the tax on a main home. What matters is the home sale exclusion, which you can use again once every two years. Only investment property qualifies for a 1031 exchange, which defers the gain.

    How long do I have to own a property to avoid short-term rates?

    More than one year. Property held one year or less is taxed as ordinary income at your regular bracket, which can be much higher than 15%. This calculator assumes you held the property longer than a year.

    Is the capital gains tax calculated on the sale price or the profit?

    Only on the profit. That is the sale price minus selling costs, minus your adjusted basis (purchase price plus buying costs and improvements, minus depreciation). A sale with no profit has no capital gains tax.

    Do I have to report the sale of my home if the gain is excluded?

    Yes, if you receive a Form 1099-S, or if you cannot exclude all of the gain. The IRS says to report the sale on Form 8949 and Schedule D in those cases, even when the tax comes to zero.