Capital GainsMar 22, 2026

If I sell my primary residence which I also used partly as an office, how does the home office deduction history affect my capital gains exclusion in 2025?

2.9k views5 answers
AI-Assisted Answer

Selling your principal residence generally allows taxpayers to exclude up to USD 250,000 (Single) or USD 500,000 (Married Filing Jointly) of gain under Section 121 of the Internal Revenue Code, provided you meet the ownership and use tests (lived in and owned the home for at least two of the five years preceding the sale).

However, when a portion of the home has been used exclusively and regularly for a trade or business—meaning you claimed the home office deduction—the tax treatment of the sale becomes bifurcated, affecting the potential exclusion.

### The Impact of Prior Home Office Deductions

If you claimed the home office deduction in prior years, you must account for the portion of the home used for business when calculating the gain upon sale. The gain attributable to the business use portion is treated differently:

  • Depreciation Recapture on Business Use: Any gain allocated to the business use area that is offset by prior depreciation deductions taken must be recaptured as ordinary income under IRC Section 1245. This portion of the gain cannot be excluded under the Section 121 exclusion.
  • Gain on Business Portion: The remaining gain allocated to the business portion of the home (if any) is subject to the Section 121 exclusion rules, provided the business portion meets the use tests.

### Calculating the Exclusion Allocation

To determine how much gain is eligible for exclusion, you must allocate the total gain based on the relative size of the residential vs. business use areas. If the property was used exclusively as a principal residence for the entire ownership period except for the years the home office deduction was taken, the gain calculation is as follows:

Gain Component Tax Treatment
:--- :---
Gain attributable to business use (up to depreciation taken) Taxed as Ordinary Income (Recapture)
Gain attributable to residential use Eligible for Section 121 Exclusion (up to limits)
Gain attributable to business use above depreciation recapture Eligible for Section 121 Exclusion (up to limits)

Example Scenario: A taxpayer sells a home. The total gain is USD 600,000. If 10% of the home was used for business, USD 60,000 of the gain is allocated to the business area. If USD 15,000 of depreciation was claimed on that 10%, that USD 15,000 is ordinary income recapture. The remaining USD 45,000 allocated to the business portion, plus the USD 540,000 residential portion gain, totals USD 585,000 potentially subject to exclusion. If the taxpayer is Married Filing Jointly, only USD 500,000 of this amount is excluded, meaning USD 85,000 is taxable capital gain.

### Electing Out of Home Office Recapture

Crucially, taxpayers who did not claim the home office deduction (i.e., they used the simplified method or chose not to deduct it) do not face this recapture issue upon sale. However, if the deduction was taken, the recapture rules apply unless the taxpayer elects to re-characterize the business use gain as capital gain, which may subject it to capital gains rates instead of ordinary income rates, but it will still reduce the amount eligible for the Section 121 exclusion.

Taxpayers should review IRS Publication 523 (Selling Your Home) and Publication 587 (Business Use of Your Home) for specific allocation methods. Due to the interaction between depreciation recapture and the Section 121 exclusion, professional tax advice is highly recommended when selling a mixed-use property.

primary-residence-exclusionhome-officesection-121depreciationcapital-gains
Share:
Save this answer

No spam. Just this answer, straight to your inbox.

Was this helpful?
Disclaimer: This information is for general educational purposes and is not professional tax advice. Tax situations vary. Consult a qualified tax professional for advice specific to your circumstances.