Updated October 19, 2026. Quick answer: Publication 523 is the IRS guide to selling your home. Its central rule is a home sale gain exclusion of $250,000, or $500,000 for a married couple filing jointly, when the ownership, residence and look back tests are met. The web edition is for 2025 returns and has three worksheets for the exclusion limit, the gain or loss, and the taxable gain.
Quick reference
| Item | As the IRS publication states it |
|---|---|
| Gain you may exclude on a home sale (Introduction) | $250,000 |
| Exclusion for a married couple filing jointly (Introduction) | $500,000 |
| Ownership test (Eligibility Step 2) | at least 24 months (2 years) out of the last 5 years |
| Residence test (Eligibility Step 3) | at least 24 months of the previous 5 years |
| Look back test (Review of the Eligibility Test) | 2 years before the date of the current sale |
What the publication covers
The IRS publication says “This publication explains the tax rules that apply when you sell or otherwise give up ownership of a home.” It adds that “If you meet certain conditions, you may exclude the first $250,000 of gain from the sale of your home from your income and avoid paying taxes on it.” “The exclusion is increased to $500,000 for a married couple filing jointly.”
The edition described here is Publication 523 (2025), Selling Your Home. The IRS source marks it with the line “For use in preparing 2025 Returns”.
How the publication is organized
The first large part asks whether a home sale qualifies for the exclusion, and it works through the answer as a numbered eligibility test: automatic disqualification, ownership, residence, a look back at earlier sales, exceptions, and a final determination. A second part covers a partial exclusion for a work related move, a health related move, unforeseeable events and other circumstances.
The next parts cover figuring gain or loss, including basis adjustments for fees, closing costs and improvements, and how basis works for a home acquired through a trade, a divorce, a gift or an inheritance. Later parts cover a property used partly for business or rental, how much of the gain is taxable, recapturing depreciation, and reporting the sale, including Form 8949 and Schedule D (Form 1040).
The worksheets inside it
The introduction lists what the worksheets do. The IRS publication says it will show you how to “Figure your maximum exclusion, using Worksheet 1,” “Determine if you have a gain or loss on the sale or exchange of your home, using Worksheet 2,” and “Figure how much of any gain is taxable (if any) using Worksheet 3”.
Worksheet 1 is titled Find Your Exclusion Limit, Worksheet 2 is How To Figure Your Gain or Loss, and Worksheet 3 is Determine if You Have Taxable Gain. For a worked estimate on this site, see the home sale capital gains exclusion calculator and the page on home sale taxes.
The figures that matter
Ownership: the IRS publication says “If you owned the home for at least 24 months (2 years) out of the last 5 years leading up to the date of sale (date of the closing), you meet the ownership requirement.” “For a married couple filing jointly, only one spouse has to meet the ownership requirement.”
Residence: “If you owned the home and used it as your residence for at least 24 months of the previous 5 years, you meet the residence requirement.” “The 24 months of residence can fall anywhere within the 5-year period, and it doesn’t have to be a single block of time.”
Look back: one condition listed for the maximum exclusion is “For the 2 years before the date of the current sale, you didn’t sell another home on which you claimed the exclusion.”
Taxable portion: “If you qualify for an exclusion on your home sale, up to $250,000 ($500,000 if married and filing jointly) of your gain will be tax free.” “If your gain is more than that amount, or if you qualify only for a partial exclusion, then some of your gain may be taxable.”
Business or rental use of part of the property
The IRS publication says “You can’t exclude gain on the separate part of your property used for business or to produce rental income unless you owned and lived in that part of your property for at least 2 years during the 5-year period ending on the date of the sale.” Gain tied to depreciation is handled in the recapture part, and the home sale depreciation recapture calculator on this site covers that step.
Optional adviser-matching service
Plan how to use your home-sale proceeds
For U.S. investors with $250,000 or more in investable assets. Want help deciding how proceeds fit your investments and retirement? Request adviser introductions through WiserAdvisor.
This is investment-adviser matching, not tax-return preparation.
WiserAdvisor is an independent matching service. Free to request, with no obligation to hire. Request up to three adviser introductions; a match is not guaranteed. Submitting its form allows calls, texts and emails from WiserAdvisor and up to three advisers.
Clear Money Guide may earn a referral payment for a qualifying completed form. Advisers pay for introductions; an introduction is not a Clear Money Guide recommendation.
Compare investment advisersOpens on WiserAdvisor’s site in a new tab.
Where to go next
To see how home sale gain is reported, read the guide to home sales and capital gains, then the pages for Form 8949 and Schedule D (Form 1040). Selling a home you inherited has its own page at inherited home sale capital gains, and home sale exclusion in divorce covers the divorce case.
Where this comes from
The IRS page About Publication 523 opens with “This publication explains the tax rules that apply when you sell (or otherwise give up ownership of) a home.” It links the PDF and eBook editions and the earlier revisions of the publication.
This page describes the web edition of Publication 523 (2025), Selling Your Home, as served on irs.gov on October 19, 2026. The IRS can revise a publication after we read it, and the IRS page controls. General information, not tax or legal advice.
Common mistakes
- Treating the two years as one unbroken stretch. The IRS publication says “The 24 months of residence can fall anywhere within the 5-year period, and it doesn’t have to be a single block of time.”
- Assuming a married couple needs both spouses to meet the ownership test. The IRS publication says “For a married couple filing jointly, only one spouse has to meet the ownership requirement.”
- Assuming no tax is due on any size of gain. The publication says “If your gain is more than that amount, or if you qualify only for a partial exclusion, then some of your gain may be taxable.”
- Forgetting the look back. One listed condition is “For the 2 years before the date of the current sale, you didn’t sell another home on which you claimed the exclusion.”
Related: IRS publications by number, Home sale capital gains exclusion calculator, Home sale taxes, Guide to home sales and capital gains, Form 8949, Schedule D (Form 1040), and Home sale depreciation recapture calculator.
Sources
- IRS, Publication 523 (2025), Selling Your Home (irs.gov): https://www.irs.gov/publications/p523
- IRS, About Publication 523 (irs.gov): https://www.irs.gov/forms-pubs/about-publication-523
Read from the IRS pages linked above on October 19, 2026. General information, not tax or legal advice. The IRS publication and the instructions for your own form control, and your own facts decide the outcome.