The Section 121 home sale exclusion lets you keep up to $250,000 of profit from selling your main home free of federal income tax, or up to $500,000 if you’re married and file a joint return. To qualify, you generally must have owned the home and lived in it as your principal residence for at least two of the five years ending on the sale date.1Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence Anything above the cap is taxed at long-term capital gains rates of 0%, 15%, or 20% depending on your taxable income, and high earners may owe an additional 3.8% Net Investment Income Tax on the taxable portion. Gain that falls within the exclusion is not subject to the NIIT.2Internal Revenue Service. Net Investment Income Tax
You can only use the exclusion once every two years. If you claimed it on a different home sale within the 24 months before your current sale, you’re out for the full amount, though a partial exclusion may still be available in certain situations.1Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence
The Ownership and Use Tests
Two separate tests have to be satisfied. The ownership test asks whether you held legal title to the property for at least two years during the five-year period ending on the date of sale. The use test asks whether you actually lived in the home as your principal residence for at least 730 days during that same window.1Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence The two years don’t need to be consecutive. You could live there 12 months, move out for a year, move back for another 12 months, and still pass.
Ownership means legal title on the deed. Paying the mortgage or having an informal understanding that you “own” the place doesn’t count. For the use test, the IRS looks at where you actually lived day to day: the address on your tax returns, voter registration, driver’s license, and utility bills. Weekend stays at a property you mainly use as a vacation home won’t establish it as your principal residence.
The five-year lookback is measured strictly from the closing date. If you moved out more than three years before selling, you can fail the use test even after living there for decades. Timing the sale is where people most often get tripped up.
What Counts as a Principal Residence
Your principal residence is the home where you live most of the time. It can be a house, condo, co-op apartment, mobile home, or houseboat, as long as it has sleeping, cooking, and bathroom facilities.3Internal Revenue Service. Publication 523, Selling Your Home Vacation homes, rental properties, and pure investment properties don’t qualify unless you convert them and then meet the ownership and use tests.
Vacant land next to the home can be folded into the sale if you used it as part of your residence, the land sale and the home sale occur within two years of each other, and both meet the eligibility rules. When those conditions are met, the two sales are treated as a single transaction with one combined exclusion.3Internal Revenue Service. Publication 523, Selling Your Home
Calculating Your Gain
Your taxable gain is the difference between what you net from the sale and your adjusted basis in the home. Start with the sale price and subtract selling costs like real estate commissions, legal fees, title insurance, and transfer taxes you paid as the seller. That gives you your “amount realized.”
Your basis begins with the original purchase price plus closing costs you paid when buying. You then add capital improvements and subtract any depreciation you claimed. The improvement-versus-repair line matters. Improvements add value, extend the home’s life, or adapt it to a new use: room additions, a new roof, a kitchen remodel, central air conditioning, new flooring, landscaping, fencing, security systems, and built-in appliances. Routine repairs like painting, fixing leaks, patching cracks, and replacing broken hardware don’t increase your basis. One useful exception: if repairs are done as part of a larger renovation, the whole job counts as an improvement.3Internal Revenue Service. Publication 523, Selling Your Home
Say you sell for $650,000 and pay $39,000 in selling costs, leaving an amount realized of $611,000. You bought for $400,000 and put $50,000 into a new roof, kitchen remodel, and central air, so your adjusted basis is $450,000. Your gain is $161,000. If you’re single and meet both tests, the entire $161,000 is excluded and you owe nothing on it.
Partial Exclusion When You Sell Early
If you sell before hitting the two-year marks, you may still get a reduced exclusion when the sale was primarily driven by a job change, health issue, or unforeseen circumstance.3Internal Revenue Service. Publication 523, Selling Your Home
For a work-related move, the new job must be at least 50 miles farther from the home than the old workplace was. If you had no previous job, the new workplace must be at least 50 miles from the home. Health-related moves qualify if you relocated to obtain or provide medical care for yourself or a family member, or if a doctor recommended the move. Unforeseen circumstances include the home being destroyed or condemned, a natural disaster, death of a spouse, divorce, job loss, or inability to pay basic living expenses because of a change in employment. The qualifying event can happen to you, your spouse, a co-owner, or another person who lived in the home.
The reduced cap is a simple pro-ration. Take the shortest of three periods, measured in days or months: time you lived in the home during the five-year window, time you owned it, or time since your last excluded home sale. Divide by 730 days (or 24 months) and multiply by $250,000. Married couples filing jointly run the calculation for each spouse and add the results.3Internal Revenue Service. Publication 523, Selling Your Home
A single taxpayer who lived in the home for 15 months before a qualifying job transfer would calculate 15 ÷ 24 = 0.625, then 0.625 × $250,000 = $156,250. Not the full exclusion, but a meaningful break that many people miss because they assume they don’t qualify.
Nonqualified Use and Rental Conversions
If you used the home for something other than your principal residence at any point after 2008, a portion of your gain is ineligible for the exclusion. This rule most often catches people who rented the property out before moving in.
The math is a ratio: total time of nonqualified use after 2008 divided by your total ownership period. That fraction of the gain cannot be excluded. Own a property for 10 years, rent it for the first 4 (after 2008), then live in it for 6, and 40% of your gain sits outside the exclusion.1Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence
Three exceptions matter. Time after you stop using the home as your residence but before you sell doesn’t count as nonqualified use, which protects sellers who move out and then take time to close. Periods of qualified military service, up to 10 years, are also excluded. Temporary absences of up to two years for job changes, health conditions, or unforeseen circumstances don’t count either.4Office of the Law Revision Counsel. 26 US Code 121 – Exclusion of Gain From Sale of Principal Residence
Home Office and Rental Portions: Depreciation Recapture
If you used part of your home exclusively for business or to produce rental income, you don’t have to split the sale into two transactions. But you cannot exclude gain equal to the depreciation you claimed, or were entitled to claim, after May 6, 1997. That depreciation is “recaptured” and taxed at a maximum rate of 25% as unrecaptured Section 1250 gain.3Internal Revenue Service. Publication 523, Selling Your Home If you claimed $8,000 in depreciation over several years for a home office, that $8,000 is carved out of any exclusion and taxed when you sell. When both nonqualified use and depreciation apply, the recapture amount is stripped out first, and the nonqualified-use ratio applies to what’s left.
Married Couples, Divorce, Military, and Surviving Spouses
Married couples filing jointly get the $500,000 cap, but the requirements differ slightly. Only one spouse needs to meet the ownership test, but both spouses must independently meet the use test, and neither spouse can have used the exclusion on a different home sale in 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 clears both tests, the couple can still file jointly and claim up to $250,000.
If you or your spouse is serving on qualified official extended duty in the uniformed services or Foreign Service, you can elect to suspend the five-year lookback for up to 10 years. The effective window for meeting the two-year use test can stretch to 15 years.5eCFR. 26 CFR 1.121-5 Suspension of 5-Year Period for Certain Members of the Uniformed Services and Foreign Service
In a divorce, if a home is transferred between spouses the receiving spouse inherits the transferring spouse’s ownership period. Separately, if a divorce decree lets your former spouse live in the home, you’re treated as using it as your principal residence during that time even after moving out.4Office of the Law Revision Counsel. 26 US Code 121 – Exclusion of Gain From Sale of Principal Residence
A surviving spouse can still claim the full $500,000 exclusion instead of $250,000 if the sale closes within two years of the spouse’s death, the survivor hasn’t remarried by the sale date, neither spouse used the exclusion in the two years before the sale, and the ownership and use requirements are met counting the late spouse’s time. After the two-year window closes, the survivor is limited to the $250,000 cap.1Office of the Law Revision Counsel. 26 USC 121 Exclusion of Gain From Sale of Principal Residence
Inherited Homes and 1031 Exchange Property
An inherited home usually receives a stepped-up basis to fair market value on the date of death, which often shrinks the taxable gain to little or nothing before Section 121 even enters the picture.3Internal Revenue Service. Publication 523, Selling Your Home If you want to claim the Section 121 exclusion on an inherited property, you still need to move in and satisfy the two-year ownership and use tests yourself.
If you acquired the home through a Section 1031 like-kind exchange (converting investment property into your residence), you cannot use the Section 121 exclusion until you’ve owned the property for at least five years after the exchange. The two-year use test still applies on top of that.4Office of the Law Revision Counsel. 26 US Code 121 – Exclusion of Gain From Sale of Principal Residence
Reporting the Sale
Whether you have to report the sale depends on the paperwork. If the closing agent issues Form 1099-S to the IRS, you must report the transaction on Form 8949 and Schedule D of your Form 1040, even if the entire gain is excludable.6Internal Revenue Service. About Form 8949, Sales and Other Dispositions of Capital Assets
You can often avoid the 1099-S. If the sale price is $250,000 or less ($500,000 if you certify you’re married), you give the closing agent a written certification, under penalties of perjury, that the home is your principal residence, the full gain is excludable, and there were no periods of nonqualified use after 2008. When the closing agent has a valid certification, they don’t have to file the 1099-S.7Internal Revenue Service. Instructions for Form 1099-S
When only part of the gain qualifies, you report the entire sale. The excluded portion is shown as an adjustment on Form 8949, the remaining gain flows to Schedule D at capital gains rates, and any depreciation recapture is reported separately and taxed at up to 25%.3Internal Revenue Service. Publication 523, Selling Your Home Skipping the recapture is one of the more common errors the IRS catches on audit, and it comes with penalties and interest on top of the tax.