Skip to content
Clear Money Guide Calculate fees
Menu

Home Sale Capital Gains Exclusion Calculator (Section 121)

Updated July 30, 2026. Quick answer (2026): Enter your purchase price, improvements, sale price, costs, months of ownership and use, any depreciation taken, your MAGI and your own capital gain rate. The tool returns the dollar tax on the sale, not a yes/no on the exclusion.

Home sale capital gains calculator

Why the rate is a field and not a lookup. The 0/15/20 percent long-term capital gain brackets are indexed for inflation every year, so any tool that hardcodes them is wrong within twelve months. The Section 121 caps and the 3.8 percent net investment income tax thresholds are written as fixed dollar figures in the statute with no indexing mechanism, so those are built in and cited. Enter the rate that applies to you.

You have the number. Now decide what to do with it.

A sale of this size usually arrives with a second decision attached — where the proceeds go, and whether the year the gain lands is the right year for anything else taxable. The matching service below introduces you to advisers who pay to meet you. Bring the figure above and ask what they would do with it.

Before you start, what actually happens. The form is run by Kapitalwise, our advisor-matching partner. It asks about nine questions — age, investable assets, location — then your name, email and phone number, and verifies the phone by text.

Kapitalwise sends your details to advisers who pay for the introduction, so expect calls and texts. Clear Money Guide is paid when you submit the form, whether or not you ever hire anyone. Nothing loads and nothing reaches Kapitalwise until you press the button.

Compare fees, scope, conflicts, credentials and fiduciary duty before you hire anyone.

The Kapitalwise form opens here — you stay on this page.

What this calculator actually decides

Most home-sale tools answer a yes/no question: does the exclusion apply. That is rarely the question a seller has. The question is how many dollars leave the closing and go to the IRS, and that number depends on five things the yes/no tools skip: what your basis really is after improvements, whether depreciation was ever taken, whether the two-year test is met in months rather than in principle, your own capital gain rate, and whether your income drags the 3.8 percent net investment income tax into the sale.

The order of operations that most tools get wrong

Depreciation comes out of the gain before the exclusion is applied, not after. Section 121(d)(6) says the exclusion “shall not apply to so much of the gain from the sale of any property as does not exceed the portion of the depreciation adjustments… attributable to periods after May 6, 1997.” A tool that applies the $500,000 exclusion first and recaptures afterwards will tell a former landlord they owe nothing when they owe real money. This calculator carves the depreciation slice out first, taxes it as unrecaptured Section 1250 gain at up to 25 percent, and applies the exclusion only to what is left.

The two-of-five test, in months

Section 121(a) requires that during the five-year period ending on the sale date, the property was “owned and used by the taxpayer as the taxpayer’s principal residence for periods aggregating 2 years or more.” Two things follow that people miss. The periods aggregate — they do not have to be continuous. And ownership and use are separate tests that both have to be satisfied, which is why the joint-return rule in 121(b)(2) is asymmetric: either spouse must meet the ownership requirement, but both must meet the use requirement.

Worked example

A couple bought for $400,000, put $75,000 into a kitchen and a roof, paid $8,000 in closing costs on the way in, and sell for $900,000 with $54,000 of selling costs. Adjusted basis is $483,000. Amount realized is $846,000. Realized gain is $363,000 — under the $500,000 joint exclusion, so the federal tax on the sale is zero. Change one fact: they rented it out for a stretch and took $90,000 of depreciation. Now $90,000 is carved out first and taxed at 25 percent, and the sale costs $22,500 before any state tax.

Related

Methodology

  • Exclusion caps, the 2-of-5 test, the nonqualified-use allocation, the reduced-exclusion fraction and the depreciation carve-out are taken from the text of 26 U.S.C. 121. The 3.8 percent rate and its thresholds are from 26 U.S.C. 1411. Both were read on 2026-07-30.
  • Section 121 caps and Section 1411 thresholds are written in the statute as fixed dollar amounts with no indexing mechanism, so they are built in. Long-term capital gain brackets ARE indexed annually, so your rate is an input rather than a lookup.
  • Figures were computed by two independently written engines that agree to the cent, and the calculator on this page reproduces both exactly.
  • Federal only. State treatment varies and some states do not follow the federal exclusion.

Educational estimate, not tax advice, and not a filed return. Federal only. Confirm anything that changes a filing decision with a CPA or tax attorney.

Editorial standards: Editorial Policy | Corrections | Disclaimer

Embed this calculator on your site

Publishers, agents and bloggers: you can embed a compact version of this calculator free. Copy the code below into any page or post (it is self-contained — no external scripts, nothing loads from our servers). The only condition is that the “Powered by Clear Money Guide” credit link stays intact.

The embedded version covers the standard case (full 2-of-5 eligibility, single or joint). For partial exclusions, inherited homes and rental conversions it links readers back to this full calculator. Questions or a custom version: [email protected].

Two more cases: selling after a divorce — who keeps the exclusion, and when $500,000 drops to $250,000 — and second home vs primary residence, where the exclusion usually does not apply at all.

GuidesHome Sale Taxes

Leave a Comment

Your email address will not be published. Required fields are marked *