Calculate capital gains tax on your home sale. Apply the Section 121 exclusion ($250k/$500k) and see your taxable gain and estimated tax liability.
When you sell your home for more than your adjusted basis, the profit is a capital gain that may be subject to federal and state taxes. However, the Section 121 exclusion allows most homeowners to exclude up to $250,000 (single filers) or $500,000 (married filing jointly) from capital gains tax if they've lived in the home as their primary residence for at least two of the past five years.
This calculator computes your capital gain by subtracting your adjusted basis (purchase price plus improvements minus depreciation) from the sale price minus selling expenses. It then applies the applicable Section 121 exclusion and shows your taxable gain and estimated tax at the current long-term capital gains rate.
Understanding your tax exposure before selling helps you time the sale strategically, make improvements that increase your cost basis, or plan for the tax liability. For investment properties, this tool also shows the gain before considering a 1031 exchange.
Capital gains tax can take a significant bite out of your home sale profit, especially if your gain exceeds the Section 121 exclusion or if the property doesn't qualify. This calculator helps you estimate your tax liability months before selling so you can plan accordingly, potentially timing the sale to optimize your tax situation or consulting a tax professional with specific numbers.
Adjusted Basis = Purchase Price + Improvements − Depreciation Amount Realized = Sale Price − Selling Expenses Capital Gain = Amount Realized − Adjusted Basis Taxable Gain = Capital Gain − Section 121 Exclusion Estimated Tax = Taxable Gain × Capital Gains Rate
Result: $0 taxable gain
Adjusted basis: $300,000 + $50,000 = $350,000. Amount realized: $650,000 − $45,000 = $605,000. Capital gain: $605,000 − $350,000 = $255,000. With the $500,000 married exclusion, the entire $255,000 gain is excluded from taxation.
Your adjusted basis starts with the original purchase price and adds qualifying capital improvements. New roof, kitchen remodel, room addition, HVAC replacement, and major landscaping all count. Routine maintenance, repairs, and cosmetic touch-ups generally do not increase your basis. Keep detailed records including receipts, contracts, and before/after photos.
To qualify for the full Section 121 exclusion, you must have owned the property AND used it as your primary residence for at least 24 months during the 60 months preceding the sale. The ownership and use periods don't need to be concurrent, and short absences (vacations, seasonal absences) generally count as periods of use.
Partial exclusions are available if you sell before meeting the 2-year requirement due to a job change, health condition, or unforeseen circumstances. If you used the property as a rental before converting it to your primary residence, gain attributable to rental periods after December 31, 2008, is not eligible for the exclusion.
Section 121 of the Internal Revenue Code allows homeowners to exclude up to $250,000 (single) or $500,000 (married filing jointly) of capital gains from the sale of their primary residence. You must have owned and used the home as your main residence for at least 2 of the 5 years before the sale.
Your adjusted basis is the original purchase price plus the cost of qualifying capital improvements minus any depreciation claimed. Improvements that add value, prolong the home's life, or adapt it to new uses increase your basis. Routine maintenance and repairs do not.
Long-term capital gains rates for 2025–2026 are 0% for taxable income up to $47,025 (single) or $94,050 (married), 15% for income up to $518,900 (single) or $583,750 (married), and 20% above those thresholds. An additional 3.8% net investment income tax may apply at higher income levels.
No, the Section 121 exclusion only applies to your primary residence. Investment properties and second homes do not qualify. However, if you convert a rental to your primary residence and live in it for 2+ years, a partial exclusion may apply, with gain attributable to rental periods after 2008 still taxable.
Capital improvements that increase your basis include additions, new roofing, HVAC systems, kitchen remodels, bathroom renovations, new windows, landscaping, driveway installation, and major system replacements. Keep all receipts and document each improvement.
Any gain above the exclusion amount ($250k/$500k) is taxed at long-term capital gains rates. For example, a married couple with $600,000 in gain would exclude $500,000 and pay capital gains tax on the remaining $100,000. State taxes may also apply to the excess gain.