The Section 121 home sale exclusion lets you keep up to $250,000 of profit from the sale of your primary residence out of your federal taxable income, or up to $500,000 if you’re married and file jointly. You don’t file anything special to claim it. If you meet the ownership and use tests, the exclusion applies automatically, and any gain above the cap is taxed as a long-term capital gain.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
Who Qualifies
Two tests decide eligibility, and both look at the five-year period ending on the date of sale. You must have owned the home for at least two of those five years, and you must have lived in it as your primary residence for at least two of those five years. The two-year periods don’t have to overlap, and the days don’t have to be consecutive. Any combination that adds up to 24 full months or 730 days inside the five-year window works.2eCFR. 26 CFR 1.121-1 – Exclusion of Gain From Sale or Exchange of a Principal Residence
If you own more than one home, only one counts as your primary residence at a time. The IRS looks at where you actually spend the majority of the year, along with the address on your tax returns, driver’s license, and voter registration, and where you receive mail.2eCFR. 26 CFR 1.121-1 – Exclusion of Gain From Sale or Exchange of a Principal Residence
How Much You Can Exclude
Single filers can exclude up to $250,000 of gain. Married couples filing jointly can exclude up to $500,000, but only if both spouses independently satisfy the two-year use test. Only one spouse needs to meet the ownership test. If just one spouse qualifies under both tests, the joint limit falls to what each spouse would qualify for individually, which usually means $250,000.3Internal Revenue Service. Publication 523, Selling Your Home1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
Surviving Spouses
If your spouse has died and you haven’t remarried, you can still claim the full $500,000 exclusion, provided you sell within two years of your spouse’s death and meet the ownership and use requirements (you can count your late spouse’s ownership and residency toward the tests). Neither you nor your late spouse can have claimed the exclusion on another home sale within the previous two years.3Internal Revenue Service. Publication 523, Selling Your Home
A separate rule can help even more: the tax basis of property owned by someone who dies resets to its fair market value on the date of death.4Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent For a surviving spouse selling shortly after, that stepped-up basis often shrinks or eliminates the taxable gain before the exclusion is even applied.
How to Calculate the Gain
The taxable gain isn’t the sale price minus what you paid. Start with the sale price, subtract your selling expenses, and subtract your adjusted basis. What’s left is your gain.
Your adjusted basis begins with the original purchase price and certain closing costs from the purchase. Add the cost of capital improvements over the years: projects that add value, extend the home’s useful life, or adapt it to a new use, such as a new roof, an addition, central air, or a home security system. Routine repairs and maintenance like painting or fixing a leak don’t count. If you claimed depreciation for a home office or rental use after May 6, 1997, that reduces your basis.
Selling expenses reduce your gain further. These include real estate commissions, advertising, legal fees, transfer or stamp taxes you paid as the seller, and any loan charges you covered that would ordinarily fall on the buyer.3Internal Revenue Service. Publication 523, Selling Your Home
A higher basis and higher selling expenses both mean a smaller gain, so keep organized records of every improvement and every closing statement.
The Once-Every-Two-Years Rule
You can only use the Section 121 exclusion once every two years. If you excluded gain on an earlier sale, the two-year clock runs from the date of that sale. Selling another primary residence inside that window generally makes you ineligible for any exclusion on the second sale, even if you fully meet the ownership and use tests on the new home.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
Partial Exclusion for Hardship
If you fall short of the two-year ownership requirement, the two-year use requirement, or the two-year frequency rule, you may still get a reduced exclusion when the sale is driven by a change in workplace location, a health issue, or certain unforeseen circumstances.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
The reduced amount is a fraction of the full $250,000 or $500,000 cap. Take the shortest of three periods (how long you lived in the home, how long you owned it, or the time since your last exclusion), divide by 730 days or 24 months, and multiply that fraction by the maximum exclusion for your filing status.3Internal Revenue Service. Publication 523, Selling Your Home
When Part of the Gain Still Gets Taxed
Even when you qualify, the exclusion doesn’t always cover everything.
Non-Qualified Use
Any period after 2008 when neither you nor your spouse used the property as a primary residence is a “period of non-qualified use.” Gain allocated to that period can’t be excluded. The non-qualified portion is calculated by dividing the non-qualified-use days by the total days you owned the home, then multiplying that fraction by your net gain. Temporary absences of up to two years for job relocations, health issues, or unforeseen circumstances don’t count against you, and neither do up to 10 years of qualifying military or Foreign Service duty.3Internal Revenue Service. Publication 523, Selling Your Home1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence
Depreciation Recapture
Depreciation deductions you claimed after May 6, 1997 for a home office, rental, or business use can’t be excluded. That portion of the gain is taxed at a rate of up to 25%.5Internal Revenue Service. Sales, Trades, Exchanges 3 The Section 121 exclusion then applies to whatever is left.
Gain Above the Cap
Profit that exceeds $250,000 or $500,000 is taxed as a long-term capital gain if you owned the home for more than a year. The federal rates are 0%, 15%, or 20%, depending on your total taxable income.6Internal Revenue Service. Topic No. 409, Capital Gains and Losses A married couple with a $600,000 gain, for example, would exclude $500,000 and pay capital gains tax on the remaining $100,000.
Higher-income sellers may also owe the 3.8% Net Investment Income Tax on the non-excluded portion. It applies when modified adjusted gross income exceeds $200,000 for single filers, $250,000 for married couples filing jointly, or $125,000 for married filing separately, and it hits the lesser of your net investment income or the amount your income exceeds the threshold. It does not apply to gain covered by the Section 121 exclusion.7Internal Revenue Service. Topic No. 559, Net Investment Income Tax
Losses on the sale of a personal residence are not deductible against other income.
Military, Foreign Service, and Intelligence Duty
If you or your spouse serve on qualified extended duty in the uniformed services, the Foreign Service, or the intelligence community, you can elect to pause the five-year clock for up to 10 years. That means you can be away from home for a decade and still meet the tests, so long as you satisfied the two-year residency requirement before your service began.1Office of the Law Revision Counsel. 26 USC 121 – Exclusion of Gain From Sale of Principal Residence You make the election by excluding the gain from your income on the tax return for the year of sale.8eCFR. 26 CFR 1.121-5 – Suspension of 5-Year Period for Certain Members of the Uniformed Services and Foreign Service
Divorce and Separation
If you received the home from a spouse or former spouse as part of a divorce, you can count your spouse’s ownership time toward your own ownership test, so a title transfer doesn’t restart the clock. Each spouse still has to satisfy the two-year use test individually. If a divorce or separation instrument lets your former spouse stay in the home, you can treat the property as your residence for that time even though you’re the one on the title.3Internal Revenue Service. Publication 523, Selling Your Home
Reporting the Sale
Whether you need to report the sale depends on the size of the gain and whether the closing agent issued you a Form 1099-S. If your entire gain is excluded and you didn’t receive a 1099-S, you generally don’t have to report the sale at all. Closing agents can skip the form when the sale price is $250,000 or less ($500,000 for a married seller) and you give them a written certification that the home was your primary residence and the full gain is excludable.9IRS.gov. Instructions for Form 1099-S
If you did receive a 1099-S, or your gain exceeds the cap, report the transaction on Form 8949 and carry the totals to Schedule D of Form 1040. The excluded portion is entered as a negative adjustment on Form 8949.10Internal Revenue Service. Instructions for Schedule D (Form 1040) If you sold at a loss and received a 1099-S, you still have to report the sale, but you can’t deduct the loss.