Home  /  Reed Reports  /  IRS Guides Summarized  /  Publication 523
IRS Publication Summary

Publication 523 Summarized — Selling Your Home

This page is a plain-English working summary of IRS Publication 523 — Selling Your Home. It is written for homeowners who have sold or are planning to sell a primary residence and want to understand the tax consequences. The purpose is not to replace the official IRS material, but to explain what the publication covers and how it is usually used in real tax work.

Key Takeaways

  • Section 121 allows individuals to exclude up to $250,000 of gain ($500,000 for married filing jointly) on the sale of a main home, but only if the ownership and use tests are met.
  • The exclusion is not automatic — it depends on how long the seller owned and lived in the home, and whether the exclusion was used on a prior sale within the last two years.
  • Gain is calculated as the difference between the amount realized and the adjusted basis, which means home improvements and certain settlement costs directly affect the tax result.
  • Special situations — including divorce, death of a spouse, military service, and prior home office use — can modify eligibility, the exclusion amount, or the gain calculation itself.

Common Mistakes to Avoid

  • Assuming no gain exists because the sale price is close to the original purchase price, without accounting for depreciation previously claimed on a home office or rental portion.
  • Failing to track home improvements that increase basis, which directly reduces taxable gain.
  • Believing the exclusion applies to any property the taxpayer owns rather than only to the main home where the ownership and use tests are satisfied.
  • Not realizing that a partial exclusion may be available when a taxpayer sells before meeting the full two-year requirement due to a qualifying change in employment, health, or unforeseen circumstances.

Section-by-Section Summary

How the section 121 exclusion works for home sellers

The section 121 exclusion is the primary tax benefit available to homeowners who sell their main residence at a gain. The publication explains that a single filer can exclude up to $250,000 of gain and a married couple filing jointly can exclude up to $500,000, provided both spouses meet the use test and at least one meets the ownership test. The exclusion is available each time a main home is sold, but generally no more frequently than once every two years. Understanding this framework is the first step before calculating whether any gain is taxable. For how this fits into the broader return, see our guide to how Form 1040 tax returns work.

Why the ownership and use tests are central to eligibility

To qualify for the full exclusion, the taxpayer must have owned the home for at least two of the five years before the sale (the ownership test) and must have used it as their main home for at least two of those five years (the use test). These two years do not need to be consecutive. The publication walks through how periods of ownership and use are counted, and explains that both tests must be met independently. Failing either test typically disqualifies the taxpayer from the full exclusion, although a partial exclusion may still be available in certain circumstances.

How gain is calculated on a home sale

Gain on a home sale equals the amount realized (sale price minus selling expenses) minus the adjusted basis. The adjusted basis starts with the original purchase price plus certain settlement and closing costs, then increases for capital improvements (additions, renovations, and major systems replacements) and decreases for any depreciation allowed or allowable (such as from a home office deduction or rental use). The publication emphasizes that recordkeeping for improvements is essential because these adjustments directly reduce the taxable gain. Many taxpayers lose basis simply because they cannot document improvements made years earlier.

What partial exclusions are and when they apply

If a taxpayer sells their main home before meeting the full two-year ownership and use requirements, a partial exclusion may still be available if the sale was due to a change in place of employment, a health condition, or certain unforeseen circumstances (such as divorce, death, or natural disaster). The partial exclusion is calculated as a proportion of the full exclusion based on how much of the two-year period was actually completed. The publication lists specific qualifying events and explains how to compute the reduced exclusion amount.

How special situations like divorce, death, and military service affect the rules

Publication 523 devotes significant attention to how the exclusion rules are modified in special circumstances. When a spouse dies, the surviving spouse may be able to use the $500,000 exclusion if the sale occurs within two years of death and other conditions are met. In divorce situations, the publication explains how ownership and use periods can be attributed between former spouses depending on the terms of the decree. For military and certain government personnel, the five-year lookback period can be extended up to ten years, providing more flexibility in meeting the use test after extended absences.

Why basis adjustments and home improvements matter

The difference between a taxable gain and a fully excluded gain often comes down to basis. Capital improvements — not routine maintenance or repairs — increase the home’s adjusted basis and thereby reduce the gain. The publication helps taxpayers distinguish between improvements (which add basis) and repairs (which do not). It also explains how casualty losses, insurance reimbursements, and energy credits can affect basis. Keeping organized records of all improvement expenditures throughout the period of ownership is one of the most practical pieces of advice the publication offers.

How Publication 523 works with capital gains reporting on Schedule D

If the gain on the sale exceeds the exclusion amount, or if the taxpayer does not qualify for the exclusion, the gain must be reported on Schedule D and may also require Form 8949. The publication explains when reporting is required even if the entire gain is excluded (generally, it is not required if the full gain is excluded and Form 1099-S was not received). When depreciation recapture applies — for example, from a home office deduction taken under the actual method — that portion of the gain cannot be excluded and must be reported separately. Understanding how tax brackets apply to the taxable portion helps in planning.

How readers should use the publication before or after selling a home

The publication is most valuable when read before the sale closes, because decisions about timing, improvements, and documentation can affect the tax result. After the sale, the publication helps determine whether the exclusion applies, how much gain is taxable, and what forms need to be filed. In practice, taxpayers who read Publication 523 after the fact often discover that they missed basis-increasing improvements or did not properly track their use periods. Proactive reading prevents the most common and expensive mistakes.

How to Use This Publication

Begin with the eligibility sections to determine whether you meet the ownership and use tests. If you do, move to the gain calculation sections to understand how your basis is determined and what your actual gain is. If your gain exceeds the exclusion, review the reporting requirements on Schedule D. If you sold before meeting the full two-year tests, check whether a partial exclusion applies.

In practice, Publication 523 is one of the most frequently consulted IRS publications because home sales are common and the dollar amounts involved are large. Practitioners use it to verify exclusion eligibility, compute adjusted basis, and determine whether any reporting is required even when the full gain is excluded.

For related context, see our guides on how Form 1040 tax returns work and how tax brackets work.

Frequently Asked Questions

What does this IRS guide cover?

Publication 523 explains the section 121 home sale exclusion, the ownership and use tests, how to calculate gain, when partial exclusions apply, and how special situations like divorce, death, and military service modify the rules.

Is this summary enough to file correctly?

No. This page is a practical summary. Readers should review the official publication for exact thresholds, worksheets, and examples, especially when the gain is large or special circumstances apply.

Who should read this page first?

Homeowners who have sold or plan to sell their main residence, taxpayers who received Form 1099-S, and anyone trying to understand whether gain on a home sale is taxable or excludable.

Official IRS source: Publication 523 — Selling Your Home
Last updated: April 2026. This is a general summary. The official IRS publication contains complete rules, examples, thresholds, and exceptions. Readers should review it directly and seek professional advice where facts are complex.

Need Help With This Tax Topic?

Our team helps individuals, business owners, and advisors translate IRS publications into actionable compliance and planning strategies.

Schedule a Consultation