Skip to content
Independent money guidance
Clear Money Guide
Start here
Menu

Selling a Duplex You Lived In: the Slice the Exclusion Never Covers

Clear Money Guide

On this page

Use this map to find the part of the guide you need.

Updated August 7, 2026. Quick answer: when you sell a duplex you lived in half of, the home-sale exclusion does not simply apply or not apply — it applies to part of the gain. 🔴 And one slice is carved out no matter how long you lived there: the depreciation you took (or could have taken) on the rental half.

The property splits before the maths starts

A two-unit building you occupied one side of is, for tax purposes, two things: a principal residence and a rental property. The sale price, the basis and the gain are allocated between them — typically on a reasonable measure such as square footage — and the home-sale exclusion is then applied only to the residence share.

The rental share is an ordinary investment-property sale. No exclusion, and its own gain calculation.

⚠️ The allocation is where the money is, and it is a fact question about your building rather than a rule with a single right answer. It should be documented at the time, with the reasoning written down, not reconstructed under examination years later.

🔴 The carve-out that survives everything

This is the part sellers are most often blindsided by. The Code says the exclusion:

shall not apply to so much of the gain from the sale of any property as does not exceed the portion of the depreciation adjustments (as defined in section 1250(b)(3)) attributable to periods after May 6, 1997, in respect of such property.

Depreciation you claimed on the rental half comes back into income no matter how perfectly you satisfy the two-out-of-five-year test. Living there longer does not shelter it. Moving back in does not shelter it. The exclusion is simply switched off for that slice of gain.

⚠️ And the phrase to be careful about is “depreciation adjustments”, not “depreciation you actually deducted.” The general rule elsewhere in the Code operates on depreciation allowed or allowable — which is why a landlord who never claimed it can still be treated as having taken it. Never depreciating the rental half is not a way out of this; it is usually a way of losing the deduction and keeping the consequence. If that describes you, it is worth professional advice before the sale, not after.

Real money, real allocation — worth a second opinion.

The allocation between residence and rental share is a fact question with room for legitimate judgment, and it is the whole ballgame on a sale with real equity in it. An adviser who prices the whole transaction can help you document the allocation correctly before you file, not after an examination raises it.

Before you start, what actually happens. The form is run by Kapitalwise, our advisor-matching partner. Kapitalwise sends your details to advisers who pay for the introduction, so expect calls and texts. Clear Money Guide is paid when you submit the form, whether or not you ever hire anyone. This is free to you and there is no obligation to hire anyone.

The Kapitalwise form opens here — you stay on this page.

What happens when you press the button

It asks about nine questions — age, investable assets, location — then your name, email and phone number, and verifies the phone by text. Nothing loads and nothing reaches Kapitalwise until you press the button.

The second carve-out: periods of nonqualified use

Separately, the exclusion does not apply to gain allocated to periods of nonqualified use, apportioned:

based on the ratio which— (i) the aggregate periods of nonqualified use during the period such property was owned by the taxpayer, bears to (ii) the period such property was owned by the taxpayer.

A “period of nonqualified use” is any period the property was not the principal residence of the taxpayer or their spouse or former spouse — and the statute excludes any portion of a period preceding January 1, 2009 from the count, with further exceptions. Time before 2009 does not drag your ratio down.

The provision almost nobody knows about

Worth stating because it decides real cases. Where a taxpayer becomes physically or mentally incapable of self-care, and owned and used the property as a principal residence for periods aggregating at least 1 year during the five-year period, the taxpayer is treated as using it as a principal residence during any time in that period spent in “any facility (including a nursing home) licensed by a State or political subdivision to care for an individual in the taxpayer’s condition.”

🔴 Time in licensed care can still count as residence. Families selling a parent’s home after a move into care routinely assume the clock stopped. Under this provision it may not have.

Before you sell

Pull the depreciation schedules for every year the rental side was in service. The carve-out is computed from them, and reconstructing them at closing is the expensive version.

Document the allocation method while the building is still in front of you.

Work out the residence-side and rental-side numbers separately before agreeing a price, because the after-tax result is not a single percentage of the headline figure.

Related: inherited home sale and capital gains (a different regime entirely — basis steps up) · the home-sale exclusion in divorce.

⚠️ Scope

This describes how the statute divides the gain. It is not tax advice, no dollar figures or exclusion amounts are asserted here, and a mixed-use sale with real money in it is a conversation with a tax professional who can see your depreciation history.

Sources

Quoted from 26 U.S.C. § 121 — subsection (b)(5) (gain allocated to periods of nonqualified use), (d)(6) (recognition of gain attributable to depreciation), and (d)(7) (use during periods of out-of-residence care) — via Cornell’s Legal Information Institute, retrieved 7 August 2026: law.cornell.edu.

See whether an adviser match is worth comparing