Internal Revenue Code (IRC) Section 121 “The Home Sale Gain Exclusion” Explained
Internal Revenue Code Section 121 lets you exclude up to $250,000 of gain from the sale of your main home, or up to $500,000 if you’re married filing jointly, as long as you meet the ownership and use tests. It’s one of the most valuable tax breaks available to homeowners.
The Ownership and Use Tests
- Ownership: you owned the home for at least 2 years (24 months) during the 5 years before the sale.
- Use: you lived in the home as your main residence for at least 2 years during the same 5-year period. The two years don’t have to be continuous.
- Look-back: you haven’t excluded gain from another home sale in the 2 years before this sale.
For the $500,000 joint exclusion, either spouse can meet the ownership test, but both must meet the use test, and neither can have used the exclusion in the past 2 years.
Partial Exclusion
If you don’t meet the 2-year tests because you sold due to a change in place of employment, health, or unforeseen circumstances (such as divorce, death, multiple births or job loss), you may qualify for a reduced exclusion based on how long you did own and live in the home.
Situations That Reduce the Exclusion
- Depreciation: gain equal to depreciation taken after May 6, 1997 (for example, for a home office or rental use) can’t be excluded and is taxed at up to 25%.
- Nonqualified use: periods after 2008 when the home wasn’t your main residence, such as time used as a rental before you moved in, can reduce the excludable gain.
Special Rules
- Surviving spouses may use the $500,000 limit if they sell within 2 years of the spouse’s death and other requirements are met.
- Military, Foreign Service and intelligence community members on qualified extended duty can suspend the 5-year period for up to 10 years.
Reporting the Sale
If all your gain is excluded and you didn’t receive Form 1099-S, you generally don’t have to report the sale. Otherwise, report it on Form 8949 and Schedule D. Gain above the exclusion is a capital gain and may also be subject to the 3.8% net investment income tax.
Keep Your Records
Your gain is the sale price minus selling costs and your adjusted basis: what you paid plus capital improvements. Keep closing statements and receipts for improvements for as long as you own the home, plus at least three years after the sale.
See also Form 1098: Mortgage Interest Statement and our investment tax planning services.
Get Help From Diehl CPA
Tax rules change often, and the right answer depends on your full financial picture. Diehl CPA, led by Mark Diehl, CPA, CFE, prepares returns and builds tax plans for investors, retirees and closely held businesses. Learn about our tax return preparation and investment tax planning services, or contact us to talk through your situation.
This article is general information, not tax or legal advice for your specific situation. Updated October 2026.
Diehl CPA is committed to helping every taxpayer, ensuring their fair treatment, and help them know and understand their rights. Let us help you find a solution to help get rid of your tax problem.

October 13, 2026
0 Comments4 Minutes
IRS Form 9465, Installment Agreement Request, asks the IRS to let you pay a tax balance in monthly installments. Many people can set up a plan faster online, but Form 9465 is the paper route. You can…
Read More about IRS Form 9465 “Installment Agreement Request” Explained
October 13, 2026
0 Comments4 Minutes
IRS Form 12277, Application for Withdrawal of Filed Form 668(Y), Notice of Federal Tax Lien, asks the IRS to withdraw a public Notice of Federal Tax Lien (NFTL). A withdrawal removes the public…
October 13, 2026
0 Comments3 Minutes
IRS Form 2159, Payroll Deduction Agreement, sets up an installment agreement where your employer withholds a fixed amount from each paycheck and sends it directly to the IRS. It's a voluntary payment…
Read More about IRS Form 2159 “Payroll Deduction Agreement” Explained
