Do I qualify for home sale exclusion on duplex after living in both units?

Selling my duplex next month and trying to figure out if I qualify for home sale exclusion on duplex after living in both units. I bought it 6 years ago, lived in the downstairs unit as my main home for the first 4 years, then moved upstairs when a family member took over downstairs, and lived there the remaining 2 years. Never rented either unit to a stranger — just family, no rent collected. The whole building is on one parcel, one deed. My tax software is asking me to split the gain between the residential and "non-residential" portions and I'm not sure that's right given my situation. Already looked at the IRS page on selling a home but got confused about how the duplex structure affects the exclusion. Total gain will be significant so I want to get this right before I close.

30 comments

The exclusion applies to your main home, and a duplex can qualify — but only the portion you actually used as your residence. The IRS looks at ownership and use: you need to have owned and used the property as your main home for at least 24 months within the 5 years before the sale. Both units count toward that test only if both were your main home at some point. In your case, you lived in both units at different times, so the question is how the IRS allocates the gain between the residential-use portion and the business/rental-use portion. Because you never actually rented either unit for income, the "non-residential" split your software is flagging may not apply the same way it would for a landlord. But the allocation rules can still apply based on the physical split of the property.

Kelly M.

Author

So does the fact that no rent was ever collected actually matter for the allocation, or does the IRS only care about whether I personally occupied it?

Your software is probably applying the rules for a "dual-use" property — part home, part rental. But those rules are specifically for periods when part of the property was rented out. If you used the whole building as your residence (at different times in different units), and no portion was ever rented, you may not need to allocate at all. The key rule under Publication 523 is whether any portion was used for business or rental purposes. If neither unit was ever rented and there's no depreciation to recapture, the entire property could qualify as your main home. I'd double-check whether you ever claimed any depreciation deductions anywhere because that changes things.

Kelly M.

Author

No depreciation was ever claimed — I didn't report any rental income because there wasn't any. Does that mean I skip the allocation entirely?

No depreciation and no rental income is a strong position. The dual-use split is really there for properties that had a rental or business period. Without that, the entire gain could potentially qualify for the exclusion, subject to the ownership and use test for the full gain.

Worth noting: even if no rent was collected, if you gave a family member exclusive use of a unit and you weren't using it yourself, the IRS could treat that period as non-residential use. "Allowed or allowable" depreciation can be an issue if the arrangement looked like a rental even without payments. That's a facts-and-circumstances question.

Kelly M.

Author

That's a concern I hadn't thought about. The family member was there for about 2.5 years before I moved upstairs. I definitely didn't use that unit during that time.

When I sold a property with a similar mixed-use history, I uploaded my closing disclosure, old returns, and the deed to taxr.ai and it flagged exactly which years might look like a rental period and drafted a summary of how the ownership-and-use days stacked up against the 24-month test. It didn't tell me I was fine — it laid out what the IRS would look at and where the weak spots were, so I actually knew what to bring to my CPA. The allocation question for a duplex where both units were personally occupied at different times is genuinely fact-intensive. A CPA or enrolled agent who handles real estate dispositions is worth it here, especially if the gain is large.

Kelly M.

Author

Did Taxr give you an actual worksheet or just a written summary? I'm wondering how to organize everything before I sit down with someone.

The 24-month ownership and use test doesn't require the two years to be consecutive. Publication 523 says the 24 months can be any 24 months within the 5-year lookback, they don't have to run together. So your time in the downstairs unit and your time in the upstairs unit can both count toward the residency test as long as they add up to at least 24 months total.

This is right. The months don't need to be a continuous stretch. But only months inside the 5-year lookback count, so with your timeline the last 36 months downstairs and the 24 months upstairs both count toward the same test — they're not two separate tests for two separate units.

The tricky part for a duplex specifically is whether the IRS treats it as one property or two. A single-parcel duplex on one deed is generally treated as one property for the exclusion. If it were on separate parcels or had separate deeds, you'd be looking at two separate sales with separate exclusion analyses. Single parcel, single deed is the cleaner situation.

Kelly M.

Author

Mine is definitely one parcel, one deed — I confirmed that with the county. So that part at least seems straightforward.

I dealt with a duplex sale last year where the IRS matching question was whether my Form 1099-S amount tied to what I reported on Form 8949. I gave Taxr my 1099-S and my draft Schedule D and it walked through the cost basis calculation and flagged that I hadn't accounted for closing costs from the original purchase in my basis. That adjustment actually reduced my taxable gain. For the exclusion itself, if no portion was ever a rental, you'd report the sale on Form 8949 with code H in column (f) and the excluded amount as a negative number in column (g), and it flows to Schedule D. If a portion doesn't qualify, that piece gets reported separately without the exclusion.

Can you confirm: does the full excluded amount go in column (g) as a negative, or only the amount above your basis?

The excluded gain goes in column (g) as a negative number. The proceeds go in column (d) as shown on the 1099-S. Your adjusted basis goes in column (e). The difference is your gain, and then the exclusion amount in column (g) brings the taxable portion to what actually gets taxed (or zero if fully excluded).

One thing that could affect your exclusion eligibility: did you do a 1031 exchange to acquire this duplex? Publication 523 says a home acquired through a like-kind exchange within the 5 years before the sale is not eligible for the exclusion. Just flagging it since you mentioned buying 6 years ago — that would be right on the edge.

Kelly M.

Author

No 1031 exchange — straight purchase. So that restriction doesn't apply to me.

The "no rent collected" point matters but so does the question of whether you deducted anything on Schedule E or anywhere else related to this property. If you ever claimed home office expenses, depreciation, or any expense allocable to the second unit on any return, the IRS can still treat that portion as having a business use period even if rent was zero.

Kelly M.

Author

Never filed a Schedule E for this property and no home office deductions either. I basically treated it as a personal residence the whole time on my returns.

The exclusion ceiling for a single filer vs. married filing jointly is different — the married amount is double the single amount. Publication 523 covers it. Worth confirming your filing status going into the sale year because that changes how much of the gain you can shelter.

If you do have a portion that doesn't qualify for the exclusion because of the family-member-use period, that portion's gain is reported on Form 8949 in Part II (long-term, since you've owned it more than a year), box F, since the sale came on a Form 1099-S rather than a 1099-B. The holding period starts the day after your purchase closing date.

Something that gets missed in duplex situations: if you're claiming the full exclusion but received a Form 1099-S, you still have to report the sale on Form 8949 even if the taxable gain is zero. The IRS instructions for the exclusion in Publication 523 are clear that a 1099-S triggers a reporting requirement regardless of gain.

Correct. And if you didn't receive a Form 1099-S and the gain is fully excluded, you don't have to report the sale at all. That changes the paperwork picture significantly depending on what your closing agent issued.

The situation with a family member occupying a unit at no charge is genuinely ambiguous. The IRS hasn't published a bright-line rule that says "rent-free family use equals personal use." The analysis leans on whether the arrangement had the characteristics of a rental — exclusivity, duration, your lack of access. A CPA or enrolled agent who handles real property dispositions should review this before you close.

Kelly M.

Author

What documentation should I be pulling together before that meeting? Trying not to walk in empty-handed.

Pull together: the original closing disclosure from purchase (for basis), every year's return showing no Schedule E, the deed showing single parcel, records of when you moved into each unit, and anything showing no depreciation was ever claimed. If you have utility bills or other records showing which unit you occupied and when, those help establish the residency dates for the 24-month test.

The partial exclusion rules might also be relevant. Even if the full exclusion doesn't apply because some period of use doesn't qualify, Publication 523 says a partial exclusion can apply if the main reason for not meeting the full test was a change in workplace, health, or an unforeseeable event. Doesn't sound like your situation, but worth knowing the full exclusion isn't the only option.

To summarize where the thread has landed: single-parcel duplex, both units personally occupied at different times, no rental income, no depreciation, no Schedule E — that's a strong position for the full exclusion if the residency months add up to 24 within the 5-year lookback. The weak point is the period when the downstairs unit was exclusively occupied by the family member and you weren't using it. That 2.5-year window is what a tax professional needs to evaluate. Bring the documentation the earlier comment listed and get a CPA or enrolled agent to review it before closing.

Kelly M.

Author

This is the clearest rundown I've gotten. Thank you — I have a meeting set for next week and now I know exactly what to bring and what questions to ask.