Quick overview

Selling a primary residence can be tax-free for many homeowners, but several rules determine whether you owe tax, how much, and what you must report. The three building blocks are: adjusted basis, amount realized, and any applicable exclusions or exceptions (IRS Publication 523).

How to calculate gain: basis and amount realized

  • Adjusted basis = purchase price + capital improvements + certain closing costs − depreciation allowed or allowable. Closing costs that add to basis include title fees and legal costs; routine repairs do not. (See IRS Pub. 523 and IRS guidance on closing costs.)
  • Amount realized = sale price − selling expenses (real estate commissions, sales-related closing costs).
  • Gain = amount realized − adjusted basis. If gain is positive, it may be taxable unless an exclusion applies.

Exclusions and eligibility

  • Principal-residence exclusion: If you owned and used the home as your main residence for at least 2 of the 5 years before the sale, you may exclude up to $250,000 of gain ($500,000 for married filing jointly). (IRS Pub. 523)
  • Partial or reduced exclusions exist for work, health, or unforeseen-circumstance moves that force a sale before meeting the full time test; the IRS allows a prorated exclusion in some cases. (IRS Pub. 523)
  • The exclusion is per seller and generally available once every two years.

For deeper detail on the exclusion itself, see FinHelp’s article on the capital gains exclusion on home sale: https://finhelp.io/glossary/capital-gains-exclusion-on-home-sale/

Rental, business use, and depreciation recapture

  • If you rented part or all of the home or claimed depreciation (for example, while it was a rental or for a home office), depreciation reduces your adjusted basis. When you sell, that depreciation (allowed or allowable) must be recaptured and is taxable, even if you qualify for the home-sale exclusion. The recaptured amount is reported and taxed under the rules described in IRS guidance. (IRS Pub. 523)

Reporting the sale to the IRS

  • If your gain is fully excluded and you have no Form 1099‑S, you typically do not need to report the sale on your federal return. However, you must report the sale if any part of the gain is taxable, you received a Form 1099‑S, or you elect to report the sale to claim a loss. When reporting taxable gain, use Form 8949 and Schedule D (Form 1040). (IRS Pub. 523; IRS Form 1099‑S instructions)

Short example

  • Purchase price: $300,000. Improvements: $40,000. Adjusted basis = $340,000.
  • Sale price: $640,000. Selling costs: $40,000. Amount realized = $600,000.
  • Gain = $600,000 − $340,000 = $260,000. An individual seller who meets the ownership/use test can exclude $250,000, leaving $10,000 taxable as capital gain.

Practical steps before you list

  1. Gather closing documents, receipts for capital improvements, and records of any depreciation. For tracking improvements, see: https://finhelp.io/glossary/how-home-improvements-may-affect-your-tax-basis/
  2. Calculate adjusted basis and estimated amount realized.
  3. Check ownership/use history to confirm the 2‑of‑5‑years test or determine if a partial exclusion applies.
  4. If you used the home for rental or business, consult a tax pro about depreciation recapture.
  5. If you expect a Form 1099‑S from the real estate settlement agent, plan to report the sale on your return unless the entire gain is excludable and the issuer codes indicate otherwise. (See IRS Form 1099‑S guidance.)

Common mistakes to avoid

  • Failing to document capital improvements (which increase basis).
  • Ignoring depreciation taken while the home was rented or used for business.
  • Assuming every home sale must be reported — many excluded gains need no return entry unless Form 1099‑S is issued or part of the gain is taxable.

Professional tips

  • Keep a dedicated folder (digital or physical) for purchase paperwork, receipts for improvements, and closing statements — you’ll need them to prove basis.
  • Time a sale to satisfy the ownership/use test when possible to access the full exclusion.
  • If your life change may qualify for a reduced exclusion (job, health, unforeseen circumstances), document the event and discuss options with a CPA or enrolled agent.
  • Consider tax timing strategies if proceeds will be reinvested in real estate or other assets; see planning guidance such as FinHelp’s piece on how to plan taxes around a home sale and a move: https://finhelp.io/glossary/how-to-plan-taxes-around-a-home-sale-and-a-move/

Frequently asked questions

  • Do I always have to file Form 8949 and Schedule D when I sell? No — if your entire gain is excludable and you didn’t receive Form 1099‑S, you generally don’t need to report the sale. If any gain is taxable or you received 1099‑S, report it. (IRS Pub. 523)
  • How does renting a home affect the exclusion? Renting can reduce or eliminate the exclusion for the period it was not used as your primary residence and may trigger depreciation recapture when sold.

Sources and further reading

Professional disclaimer: This article is educational and does not substitute for personalized tax advice. For decisions that affect your tax liability, consult a qualified tax professional or CPA familiar with current IRS rules.

(Prepared using IRS guidance current as of 2025.)