For federal tax purposes, your main residence is the home where the pattern of your daily life is centered, and the IRS rules that follow from that designation can shield up to $250,000 of gain from tax when you sell, or $500,000 if you file jointly with a spouse.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence There is no checkbox that makes a property your main home. The IRS looks at where you actually live, and everything downstream — the exclusion, the two-year clocks, the recapture rules — flows from that determination.
How the IRS Decides Which Home Is Your Main Residence
If you own more than one home, the IRS applies a “facts and circumstances” test. No single factor decides it. The strongest indicator is where you physically spend most of the year, but a cluster of supporting evidence fills in the picture.
The address on your federal and state tax returns carries significant weight. So does the address on your driver’s license and vehicle registration, and where you are registered to vote. Financial ties matter too: where your primary bank accounts are held, and the mailing address your financial institutions have on file. Social connections round it out — the location of your children’s school, your workplace, and memberships in local organizations can all support the claim.2Internal Revenue Service. Publication 523 – Selling Your Home
Keep these records consistent. A tax return listing one address while your driver’s license and voter registration point somewhere else invites scrutiny. Auditors look for coherence across the whole picture, not just one document.
The Capital Gains Exclusion When You Sell
The main tax benefit tied to a principal residence is the Section 121 exclusion. When you sell at a profit, you can exclude up to $250,000 of that gain from taxable income. Married couples filing jointly can exclude up to $500,000.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence For most homeowners, that covers the entire profit and no federal tax is owed on the sale.
The gain is the difference between your selling price (minus selling costs such as agent commissions) and your adjusted basis. Adjusted basis is generally what you paid for the home plus the cost of capital improvements over the years. Replacing a roof, adding a bathroom, or installing a new HVAC system all increase your basis and reduce the taxable gain. Routine maintenance and repairs do not count. Keeping records of these expenditures is worth the effort because they directly shrink any gain that exceeds the exclusion limit.
The exclusion is available only once every two years. If you sold another home and claimed the exclusion within the two years leading up to your current sale, you cannot claim it again on this sale.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
The Ownership and Use Tests
To claim the full exclusion, you must pass two tests. The ownership test requires you to have owned the home for at least two years during the five-year period ending on the sale date. The use test requires you to have lived in the home as your principal residence for at least two of those same five years.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The two periods do not need to overlap perfectly, and neither needs to be continuous. You could live in a home for a year, rent it out for two years, and move back in for a year before selling.
Married Couples Filing Jointly
Only one spouse needs to satisfy the ownership test for a joint $500,000 exclusion, but both spouses must independently meet the use test. Neither spouse can have claimed the Section 121 exclusion on a different sale within the prior two years.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence If only one spouse meets the use test, the couple is limited to the $250,000 single-filer amount.
Surviving Spouses
A surviving spouse who sells the family home within two years of the other spouse’s death can still claim the full $500,000 exclusion, provided they have not remarried by the sale date, they meet the two-year ownership and use tests, and neither spouse used the exclusion on another home in the two years before the sale. The survivor can also count the deceased spouse’s time of ownership and use toward the requirements.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The window is short, and it is easy to miss. But the gap between a $250,000 and $500,000 exclusion can be substantial on a home that has appreciated for decades.
Partial Exclusion When You Sell Early
If you sell before meeting the two-year requirements, you may still qualify for a partial exclusion. The sale must be driven by one of three categories: a change in employment, a health-related reason, or an unforeseen circumstance.3eCFR. 26 CFR 1.121-3 – Reduced Maximum Exclusion for Taxpayers Failing to Meet Certain Requirements
The IRS provides a safe harbor for employment moves: if your new workplace is at least 50 miles farther from the home you sold than your old workplace was, you automatically qualify. If you had no previous job, the new workplace simply needs to be at least 50 miles from the home.4U.S. Department of the Treasury. Treasury Regulation 1.121-3 – Distance Safe Harbor Health-related sales qualify when a doctor recommends a change of residence for the diagnosis, cure, or treatment of you, your spouse, or a qualifying family member.
The IRS also recognizes specific unforeseen events:
- Involuntary conversion, meaning the home is destroyed, condemned, or seized.
- Disaster or terrorism causing a casualty to the residence.
- Death of a qualified individual in the household.
- Divorce or legal separation.
- Job loss making a qualified individual eligible for unemployment compensation.
- A change in employment or self-employment status that makes housing costs unaffordable.
- Multiple children from the same pregnancy.
The partial exclusion is prorated. Take the shortest of three periods: your time living in the home during the five-year lookback, your total time of ownership, or the time since your last Section 121 exclusion. Divide that by 24 months (or 730 days if you count days), then multiply by $250,000. For married couples filing jointly, each spouse runs the calculation separately and the results are added.2Internal Revenue Service. Publication 523 – Selling Your Home
Rental Periods and Depreciation Recapture
If you used the home for something other than your principal residence during your ownership, part of your gain may fall outside the exclusion. The statute calls these stretches “periods of nonqualified use,” defined as any time after December 31, 2008, when the property was not used as the principal residence of you or your spouse.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
The exclusion is reduced by a fraction: total nonqualified use divided by total ownership period. Only the gain allocated to that fraction becomes taxable; the rest can still be excluded. Own a home for ten years, rent it out for the first four, then live in it for six: the nonqualified-use fraction is 4/10, so 40% of the gain would be ineligible for the exclusion.
Three exceptions keep certain absences from counting against you. Time after the last date you used the home as your principal residence does not count. Qualified extended duty in military, Foreign Service, or intelligence roles is excluded for up to ten years. And temporary absences of up to two years total for employment changes, health conditions, or unforeseen circumstances are also excluded.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence The temporary-absence rule is the one most people miss: a one-year work assignment away from the home, followed by moving back, generally does not reduce your exclusion.
Depreciation is a separate matter. If you claimed depreciation deductions during any rental or business-use period, you owe tax on those deductions when you sell. The Section 121 exclusion does not cover depreciation recapture. This “unrecaptured Section 1250 gain” is taxed at a maximum rate of 25%, regardless of whether the rest of your profit is fully excluded.5Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed Even if total gain is well below the exclusion limit, every dollar of prior depreciation is still taxable. You cannot net it against the exclusion. Recapture is reported on Form 4797.6Internal Revenue Service. Instructions for Form 4797
Special Situations
Home Office Inside the Dwelling
A home office that is part of the same dwelling unit as your living space gets favorable treatment. On sale, you do not split the gain between business and personal use. The full gain is eligible for the exclusion, and you do not report a separate business portion on Form 4797.2Internal Revenue Service. Publication 523 – Selling Your Home The catch: depreciation claimed on the home office after May 6, 1997, must still be recaptured and taxed at up to 25%.7eCFR. 26 CFR 1.121-1 – Exclusion of Gain From Sale or Exchange of a Principal Residence If the office sits in a separate structure, such as a detached guesthouse, different rules apply and the gain must be allocated between the structures.
Property Acquired Through a 1031 Exchange
If you originally acquired your home as replacement property in a like-kind (Section 1031) exchange, a stricter timeline applies. You cannot claim the Section 121 exclusion at all during the first five years after acquisition. After that five-year ownership period, you still must meet the standard two-year use test.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence Selling even a month too early disqualifies the entire exclusion.
Military and Foreign Service Suspension
Members of the uniformed services, the Foreign Service, and the intelligence community can elect to suspend the five-year lookback period for up to ten years while on qualified official extended duty. That effectively stretches the window to fifteen years, giving far more time to meet the two-year use requirement after returning from duty.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence You make the election by filing your return for the year of sale and excluding the gain. Only one property can have the clock suspended at a time.8eCFR. 26 CFR 1.121-5 – Suspension of 5-Year Period for Certain Members of the Uniformed Services and Foreign Service Time on qualified extended duty also does not count as nonqualified use, so the rental-period allocation will not reduce your exclusion for years you were stationed away.
Inherited Homes
An inherited home receives a “stepped-up” basis equal to its fair market value on the date of the decedent’s death.9Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent If a parent bought the home for $80,000 and it was worth $400,000 at death, your basis starts at $400,000. Taxable gain on a later sale is often modest, especially if you sell soon. If you live in the home for years and it appreciates well above the stepped-up basis, the Section 121 exclusion becomes relevant, and you still need to meet the two-year ownership and use tests. Your ownership period begins on the date you inherit the property.
Destroyed or Condemned Homes
When a principal residence is destroyed, condemned, or seized, the event is treated as a sale for Section 121 purposes. Insurance proceeds or a condemnation award count as the amount realized. If the resulting gain falls within the exclusion limits, you can exclude it just as you would on a voluntary sale.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence If you use the proceeds to buy a replacement home under the involuntary conversion rules of Section 1033, the holding and use time from the destroyed property carries over.
Reporting the Sale
Whether you have to report the sale depends on two things: whether the entire gain is covered by the exclusion, and whether the closing agent issued you a Form 1099-S.
If your gain is fully excluded and you did not receive a Form 1099-S, you generally do not need to report the sale on your return at all.2Internal Revenue Service. Publication 523 – Selling Your Home Closing agents are not required to issue a Form 1099-S when the seller certifies that the home is a principal residence and the full gain is excludable (under $250,000 for single filers, under $500,000 for joint filers with no period of nonqualified use).10Internal Revenue Service. Instructions for Form 1099-S – Proceeds From Real Estate Transactions
If you do receive a Form 1099-S, you must report the sale on Form 8949 even when the entire gain is excludable, showing the exclusion as an adjustment. If you have taxable gain — because the profit exceeds the exclusion, you have nonqualified use, or you owe depreciation recapture — report it on Form 8949, Sales and Other Dispositions of Capital Assets, and summarize on Schedule D of your Form 1040.2Internal Revenue Service. Publication 523 – Selling Your Home Depreciation recapture goes separately on Form 4797.6Internal Revenue Service. Instructions for Form 4797