Tax

Section 121 Home Sale Exclusion Calculator — $250K/$500K Capital Gains Exclusion

Calculate how much of your home sale gain is tax-free under Section 121. Excludes up to $250K (single) or $500K (MFJ). Includes partial exclusion for early sales.

By The FinCalc Team

When you sell your primary residence, IRC Section 121 allows you to exclude up to $250,000 (single) or $500,000 (married filing jointly) of capital gain from federal income tax — completely tax-free. This is one of the most valuable tax breaks in the entire tax code. To qualify, you must have owned AND lived in the home as your primary residence for at least 2 of the last 5 years. If you fall short of the 2-year test, a partial exclusion may still apply if you moved for a job, health reason, or unforeseen circumstance. This calculator computes your adjusted basis, total gain, applicable exclusion, and taxable gain.

How Section 121 Home Sale Exclusion Works

The Section 121 exclusion is among the most valuable provisions in the tax code:

The basic formula:

Adjusted basis = Purchase price + buying closing costs + capital improvements
Net proceeds   = Sale price − selling costs (commission, title, etc.)
Total gain     = Net proceeds − adjusted basis
Taxable gain   = max(0, total gain − exclusion) + depreciation recapture

Full exclusion requirements:

  1. Ownership test: Owned for at least 24 months in the last 5 years
  2. Use test: Used as primary residence for at least 24 months in the last 5 years
  3. Frequency test: Have not excluded gain from another home sale in the prior 2 years

Partial exclusion: If you fail the 2-year tests due to job change, health, or unforeseen circumstances:

Partial exclusion = (Qualifying months ÷ 24) × maximum exclusion

Example: Sold after 15 months for a new job — partial exclusion = 62.5% × $250K = $156,250.

Depreciation recapture: Home office depreciation claimed in prior years is NOT excluded by §121. It's taxed at 25% as "unrecaptured §1250 gain."

When to Use This Calculator

Use this calculator when:

  • Planning a home sale — Calculate your exact taxable gain before listing your home, so you can set realistic expectations about net proceeds after taxes.
  • Timing a sale — If you're close to meeting the 2-year ownership or use test, see the tax cost of selling now vs. waiting a few more months to qualify for the full exclusion.
  • Evaluating capital improvements — Confirm that major renovation spending is adding to your basis and reducing your eventual taxable gain.
  • Quantifying the home office depreciation recapture risk — If you've been deducting a home office, see how much depreciation recapture you'll owe at sale.
  • Modeling a partial exclusion scenario — If you need to sell early due to a job relocation or health issue, see whether the partial exclusion covers your gain.

Understanding the Inputs

Filing Status
Single filers can exclude up to $250,000. Married filing jointly can exclude up to $500,000, but only if both spouses meet the 2-year primary use test (either spouse can meet the ownership test). If only one spouse meets the use test, the exclusion is limited to $250,000.
Original Purchase Price
What you originally paid for the home. This is the starting point for your adjusted basis. Do not include buying closing costs here — enter those separately so they are properly added to your basis.
Buying Closing Costs
Settlement costs paid when purchasing the home that are added to your basis: title insurance, attorney or settlement agent fees, recording fees, transfer taxes, and home inspection fees. Real estate agent commission paid by the seller reduces the seller's proceeds, not your basis.
Capital Improvements
Money spent on permanent improvements that added value, prolonged the home's useful life, or adapted it to a new use: additions, new HVAC, roof replacement, kitchen remodel, deck, hardwood floors, etc. Routine repairs and maintenance (painting, fixing a leaky faucet, replacing appliances) do NOT count as capital improvements.
Sale Price
The gross contracted sale price. Do not reduce for selling costs here — enter those separately below.
Selling Costs
Real estate agent commission (typically 5–6%), title insurance, transfer taxes, attorney fees, and other costs paid by the seller at closing. These reduce your net proceeds and therefore reduce your taxable gain.
Months Owned and Months as Primary Residence
To qualify for the full exclusion, you must have owned the home for at least 24 months and used it as your primary residence for at least 24 of the last 60 months (5 years). Enter actual months, not rounded years. A vacation home or rental property does not count toward the primary use test.
Prior Exclusion in Last 2 Years
You can only use the Section 121 exclusion once every 2 years. If you sold another home and excluded gain within the 2-year period before this sale, you are not eligible for the exclusion on this sale (unless a partial exclusion exception applies).
Exception for Partial Exclusion
If you don't meet the full 2-of-5-year tests but had to sell due to a job change, health or medical need, or unforeseen circumstances (divorce, death, natural disaster, multiple births), you may qualify for a partial exclusion. The partial exclusion is prorated based on months of qualifying use vs. the full 24-month requirement.

Frequently Asked Questions

Related Calculators

The FinCalc Team

Personal Finance Experts

The FinCalc team is a group of personal finance writers, analysts, and engineers dedicated to building accurate, transparent financial calculators. Every formula is verified against industry standards and explained in plain language.

Last reviewed and updated: