🏠

Selling Your Home Tax Guide 2026: Section 121 Exclusion, Capital Gains & State Tax

Quick Answer:When you sell your primary residence, the Section 121 exclusion allows you to exclude up to $250,000 in capital gains from federal income tax (single filers) or $500,000 (married filing jointly), provided you owned and lived in the home as your primary residence for at least 2 of the last 5 years before sale. Gains above these limits are taxed at capital gains rates (0%, 15%, or 20% federal, plus 3.8% NIIT for high earners). State income tax also applies to gains above the exclusion β€” California taxes it as ordinary income at up to 13.3%. If you rented the home before selling, depreciation recapture may apply. Investment properties do not qualify for the Section 121 exclusion.
By Daniel, founder of CountryTaxCalc.com

Last Updated:April 2026

Key Facts

Section 121 Exclusion β€” The Basic Rules
Under IRC Β§121, a taxpayer may exclude from gross income capital gain from the sale of a principal residence up to: $250,000 (single filer, or married filing separately); $500,000 (married filing jointly β€” both spouses must meet the residency test, but only one must meet the ownership test). Requirements: (1) Ownership test: you must have owned the home for at least 2 of the 5 years ending on the date of sale; (2) Use test: you must have used the home as your principal residence for at least 2 of the 5 years ending on the date of sale; (3) The exclusion may be used once every 2 years. The ownership and use periods do not need to be the same 2 years β€” they just each need to total 24 months within the 5-year lookback window. Example: you bought in January 2021, rented it until January 2022, lived in it from January 2022 through January 2025, then sold in March 2026. You meet both the ownership (5 years) and use (3 years) tests.
Calculating Your Capital Gain
Capital gain = Sale price βˆ’ Adjusted basis. Adjusted basis = Original purchase price + Improvements βˆ’ Depreciation taken (if any). Sale price is the contract price minus selling expenses: real estate agent commission (typically 5–6%), closing costs paid by seller, transfer taxes, and attorney fees. Improvements that increase basis: additions, renovations, new roof, new HVAC, landscaping improvements, finishing a basement. Repairs do NOT increase basis (painting, fixing a broken window). Example: bought for $400,000; spent $80,000 on a kitchen remodel and new HVAC over 10 years; sold for $900,000 with $45,000 in selling costs. Net proceeds = $855,000. Adjusted basis = $480,000. Capital gain = $855,000 βˆ’ $480,000 = $375,000. Married couple: $375,000 gain βˆ’ $500,000 exclusion = $0 taxable gain.
Gains Above the Exclusion β€” Capital Gains Tax Rates
If your capital gain exceeds $250,000 (single) or $500,000 (married), the excess is taxed at federal long-term capital gains rates if you held the home more than 1 year: 0% (taxable income up to $94,050 married / $47,025 single); 15% ($94,051–$583,750 married); 20% (above $583,750 married). Net Investment Income Tax: 3.8% applies to capital gains for taxpayers with modified AGI above $250,000 (married) or $200,000 (single). Example: married couple with $800,000 gain on their home. $500,000 excluded. $300,000 taxable at long-term capital gains rates. At 20% federal + 3.8% NIIT = 23.8% effective: approximately $71,400 in federal tax on the taxable portion.
Partial Exclusion for Short Ownership or Use Period
If you do not meet the full 2-year ownership or use test, you may qualify for a partial exclusion if you sold because of: a job change (new job location at least 50 miles farther from the home); health reasons (doctor recommended move for health of you or a family member); unforeseen circumstances (divorce, death of spouse, multiple births, natural disaster, loss of employment, etc.). Partial exclusion calculation: (months of qualifying use or ownership Γ· 24 months) Γ— $250,000 (or $500,000 married). Example: single person who owned and lived in the home for 12 months before a job relocation. Partial exclusion = (12/24) Γ— $250,000 = $125,000 excluded.
Depreciation Recapture β€” If You Ever Rented the Home
If you used the home as a rental property at any time and claimed depreciation deductions, those depreciation amounts are 'recaptured' and taxed as ordinary income (maximum 25% federal rate) when you sell β€” even if the overall gain qualifies for the Section 121 exclusion. Example: you lived in the home for 3 years, rented it for 4 years (claiming $40,000 in depreciation), then moved back for 2 years before selling. You meet the 2-year use test. The $40,000 of depreciation claimed during the rental period is recaptured at ordinary income rates (up to 25% federal). The remaining gain is eligible for the Section 121 exclusion. Depreciation recapture cannot be excluded under Section 121 β€” it must be recognised regardless.
State Income Tax on Home Sale Gains
Most states follow federal law on the Section 121 exclusion β€” California, New York, Massachusetts, and most other states allow the same exclusion amounts. However, states have their own rates on gains above the exclusion. California: all capital gains are taxed as ordinary income at up to 13.3% (no preferential rate). New York State: up to 10.9% on gains above the exclusion. Massachusetts: 5% (but short-term gains at 8.5%). Texas, Florida, Nevada: $0 state income tax on any gains. Example: a California married couple selling their SF home with a $300,000 taxable gain (above the $500K exclusion) owes: federal $71,400 (20%+3.8% NIIT) + California $39,900 (13.3%) = approximately $111,300 total β€” 37% effective rate on the taxable gain.

For most Americans, the family home is their largest asset β€” and the Section 121 capital gains exclusion is one of the most valuable tax provisions in the entire tax code. A married couple who bought their home for $300,000 and sell it for $800,000 can exclude the entire $500,000 gain from federal income tax β€” paying $0 in federal capital gains on a $500,000 profit. But the exclusion has specific requirements, and several factors can reduce it or eliminate it: short ownership periods, business use, prior depreciation deductions, and high-value gains above the exclusion limit. This guide covers every aspect of the home sale tax calculation β€” from the basic exclusion to partial exclusions, depreciation recapture, and state tax considerations.

Home Sale Tax Planning: Maximising the Exclusion

Planning the timing and structure of a home sale can significantly impact the tax outcome, particularly for homes with large appreciated values.

The 2-Year Clock: Strategic Planning

The 2-year use test runs back from the date of sale. If you need to sell but have not yet hit 2 years of use, consider delaying the sale until you cross the 2-year mark. The difference between selling at 23 months vs 25 months of primary residence use can be the difference between paying full capital gains tax and paying $0. Example: you bought a condo in January 2024 and have been living in it. Planning to sell in late 2025? Waiting until January 2026 (24+ months) to list ensures you qualify. The date of closing (not listing) is what counts for the use test.

Moving Out and Renting Before Sale

If you move out and rent the home before selling, the clock on the 5-year lookback window continues. You have up to 3 years after moving out to sell while still counting your prior occupancy toward the 2-year use test. Example: you lived in the home for 2 years, then rented it for 2 years, then sold. You still qualify for the full exclusion (2 years of use within the 5-year window). Wait too long after moving out (more than 3 years), and you lose the benefit for any years prior to the rental period exceeding the 5-year lookback.

Married Couples: Both Spouses Must Meet the Use Test

For married couples to claim the $500,000 exclusion, both spouses must meet the 2-year use test (lived in the home 2 of last 5 years). Only one spouse needs to meet the ownership test. Practical issue: if one spouse moved into the home shortly before marriage and the couple sells quickly after marriage, the recently-joined spouse may not meet the 2-year use test. In that case, the maximum exclusion is $250,000 (based on the qualifying spouse only). Solution: wait until both spouses have met the 2-year use test before selling if maximising the exclusion to $500,000 is a priority.

Inherited Homes

If you inherit a home, the basis steps up to fair market value at the date of death. If you move in and use it as your primary residence for 2 years, you can then sell and claim the Section 121 exclusion on any gain above the stepped-up basis. Note: if you sell immediately after inheriting without moving in, the Section 121 exclusion does not apply (you did not meet the use test) β€” but there will likely be minimal or no capital gain since the basis was just stepped up to FMV.

Investment Properties and the 1031 Exchange Alternative

The Section 121 exclusion applies only to your principal residence. Vacation homes, rental properties, and investment real estate do not qualify. The alternative for investment properties is the 1031 Like-Kind Exchange.

What Qualifies as a Principal Residence

A principal residence is the place where you primarily live β€” not a vacation home, investment property, or rental. If you own multiple properties, you can only have one principal residence at a time. The IRS looks at: where you spend the most time; where your mail goes; where you are registered to vote; where your car is registered; where your doctors and employers are. You can convert a rental property into your principal residence (move in), but depreciation recapture still applies to the period it was used as a rental, and partial exclusion rules apply if you haven't met the full 2-year use test on the residential use.

1031 Like-Kind Exchange for Investment Properties

If you sell an investment property, a 1031 exchange allows you to defer all capital gains taxes by reinvesting the proceeds into a new 'like-kind' investment property. Rules: you must identify replacement property within 45 days of sale; close on the replacement property within 180 days; the replacement property's value must be equal to or greater than the relinquished property; proceeds must be held by a qualified intermediary. 1031 exchanges defer but do not eliminate capital gains β€” they carry forward to the eventual taxable sale. For investors with large gains on a rental property, a 1031 exchange is typically far more powerful than any other tax planning tool.

πŸ’‘

CountryTaxCalc.com is reader-supported. When you use our partner links, we may earn a commission at no cost to you. Learn more about our affiliate partnerships

Home Sale Tax CPA

TaxHub

β˜… 4.8 verified reviews  Β·  3,758 reviews

Home sales with large gains, depreciation recapture, partial exclusion situations, or state tax complications require a CPA review before you close. TaxHub connects you with real estate tax specialists.

⚠ Not for simple single-state returns. Free filing is fine for straightforward W-2 situations.

Get Home Sale Tax Planning Help β†’

Frequently Asked Questions

Q: Do I need to report the home sale on my tax return if the entire gain is excluded?

You do not need to report the sale on Form 1040 if all three conditions are met: (1) your gain does not exceed the applicable exclusion ($250K single / $500K married); (2) you meet the ownership and use tests; and (3) you did not use the exclusion on another home sale in the prior 2 years. However, if you received Form 1099-S from the closing agent, the IRS has a record of the sale and you should report it (using Schedule D showing the exclusion) to avoid an automated inquiry. If any part of the gain is taxable, you must report the full sale on Schedule D regardless.

Q: I used part of my home as a home office. Does that affect the Section 121 exclusion?

Under the current IRS rules, claiming a home office deduction using the simplified method (a standard rate per square foot, up to $1,500/year) does not affect the Section 121 exclusion β€” you can still exclude the full gain on the entire home. If you used the actual expense method and claimed depreciation on the home office portion of your home, the depreciation claimed is subject to recapture as ordinary income (unrecaptured Section 1250 gain) even if the gain on the residence portion is fully excluded. Practically: if you have been deducting depreciation on a home office for several years, calculate the total depreciation claimed before selling β€” that amount will be taxed at up to 25% regardless of the exclusion.

Q: What if I sell a home I've only owned for 1 year?

If you sell before meeting the 2-year ownership and use tests, no Section 121 exclusion applies unless you qualify for the partial exclusion due to a qualifying reason (job change, health, unforeseen circumstances). The full gain is taxable. If held under 1 year: taxed at short-term capital gains rates (ordinary income rates, up to 37% federal). If held 1–2 years: taxed at long-term capital gains rates (0/15/20%) if you qualify for long-term treatment (1 year + 1 day minimum). The difference between a 364-day and 366-day holding period can mean the difference between 37% and 20% federal tax rates on your gain β€” plan accordingly if you are approaching the 1-year mark.

Q: My spouse died and I want to sell our home. How does that affect the exclusion?

A surviving spouse has a 2-year window after the spouse's death to sell the home and claim the full $500,000 married exclusion (not the reduced $250,000 single exclusion) β€” provided they have not remarried and met the residency requirements with their deceased spouse. This means: if your spouse died in 2024 and you sell the home in 2025 or 2026, you can still exclude up to $500,000 of gain. Waiting until 2027 reduces the exclusion to $250,000 (as a single filer). Additionally, the home receives a step-up in basis at the spouse's death β€” on the deceased spouse's half of community property (in community property states, the entire property steps up). Surviving spouses should get a CPA involved to optimise the timing of the sale.

Q: I sold a home in a high-tax state. Can I reduce state income tax on the gain?

State income tax on home sale gains above the Section 121 exclusion is generally unavoidable if you are a resident of that state when the sale closes β€” regardless of where the property is located. California taxes gains on California real estate even if the seller is a non-resident at the time of sale (California-source income). For a California resident selling their primary home with gains above $500K: no state-level deferral mechanism exists. The only ways to reduce California income tax on the excess gain are: (1) ensure all eligible selling expenses and improvements are included in adjusted basis; (2) consider installment sale if the buyer can pay over multiple years β€” spreading income across years may keep some gain below the highest California bracket; (3) consult a CPA about California-specific deductions available in the sale year. There is no Section 121-equivalent for California beyond the same federal exclusion amounts.

Q: What records do I need to keep to prove my home's adjusted basis?

You should keep records indefinitely for any property you own, because basis documentation may be needed years or decades after purchase. Key documents: original purchase contract and closing disclosure (HUD-1 or Closing Disclosure form); all receipts, invoices, and contracts for capital improvements (remodels, additions, new roof, new HVAC, finished basement, landscaping); any casualty loss deductions or insurance reimbursements that reduced your basis; any depreciation worksheets if you rented the property; original title documents. The IRS can audit a home sale return for 3 years normally (or 6 years if there is a significant understatement) β€” but you should keep records for at least as long as you own the property plus the audit window. Digital copies of receipts stored in cloud storage are accepted documentation.

Q: Can I claim the Section 121 exclusion on a mobile home or houseboat?

Yes, provided it meets the IRS definition of a 'residence' β€” a structure that contains sleeping space and cooking and toilet facilities. The Section 121 exclusion is not limited to traditional real estate. Mobile homes, houseboats, co-ops, and condominiums all qualify if you owned and used them as your primary residence for 2 of the 5 years before sale. The exclusion does not apply to vacant land you own (even if adjacent to your home). If you sell your home and the land it sits on together, the full proceeds are eligible for the exclusion. Selling the land separately from the home: only the proceeds allocable to the residence qualify for the exclusion β€” land without a residence does not qualify.

Disclaimer:This guide provides general tax information for educational purposes only. The Section 121 exclusion has multiple qualifying conditions, partial exclusion rules, and exceptions that are highly fact-specific. Depreciation recapture and the 2-year use test require analysis of your specific ownership and use history. State income tax treatment varies significantly. This is not tax advice. Consult a CPA before selling your home β€” particularly if you have a large gain, used the property as a rental, or claimed depreciation. Tax positions taken on a home sale return are difficult to unwind after filing.

Related Guides

1031 Exchange State Tax GuideSelling a Business Tax GuideRental Property Tax by StateCapital Gains Tax Rates β€” Best StatesCalifornia Tax Residency Rules