Does mixed-use building with former business use qualify as one dwelling unit for section 121 exclusion?

Trying to figure out if my building qualifies as one dwelling unit for the section 121 exclusion. I bought the place in 2018, ran a bookkeeping business out of a dedicated ground-floor office (about 30% of the square footage) and lived upstairs the whole time. I stopped using the office for business in 2023 and converted it to storage. Now I'm selling in 2026 and trying to figure out whether the whole building counts as one dwelling unit or if I have to treat the office portion as a separate property. I've read Publication 523 but the part about mixed-use and business-use gets confusing fast. The house passes the 2-of-5-year ownership and use tests easily. Does former business use inside the same structure kill the single-unit treatment, or does the exclusion cover the whole thing?

30 comments

Publication 523 actually addresses this directly. If the business portion of your home was within the same dwelling unit as the residential portion — meaning no separate structure, no separate deed, all under one roof — then under the rules that apply to tax years after May 6, 1997 and specifically for periods after 2008, you can treat the whole thing as one unit. The key distinction is whether the spaces were physically separate or just rooms used differently within the same building.

Diego G.

Author

That's the part I keep going back to. The office was just the ground floor — same foundation, same roof, same parcel. No separate structure, no separate deed. So it sounds like it should stay as one unit.

The two-unit vs. one-unit question actually turns on how the property was used during the period you're selling, not just whether it's under one roof. Because you stopped business use in 2023 and have been using the whole thing as a home since then, you're in a better position than someone still running a business out of it at the time of sale.

Form 4797 is where this gets complicated for the former business use. I uploaded my closing documents and depreciation schedules to taxr.ai and had it walk through what portions of gain would go to Form 4797 versus what would be excluded under section 121. Even if the building counts as one dwelling unit, any depreciation you claimed on the business portion — Schedule C home office depreciation, specifically — is not excludable. It gets recaptured as unrecaptured section 1250 gain regardless of the one-unit determination.

Diego G.

Author

I did claim depreciation through Form 8829 for those years. So even if the exclusion covers the full gain on the structure, the depreciation I took is still recaptured separately? That's the part I hadn't fully worked out.

Depreciation recapture on the section 1250 property doesn't get sheltered by the exclusion, correct. That portion flows through Form 4797 and shows up as unrecaptured section 1250 gain on Schedule D. The exclusion only shelters gain over and above the recapture amount.

The IRS drew a sharper line in the Housing Assistance Tax Act of 2008. Before that, the rules around business use within the same home were murkier. For sales after 2008, if the business use was within the same dwelling unit, the nonqualified use period that reduces your exclusion is calculated differently than for a property that was truly split into separate units.

The nonqualified use fraction under section 121(b)(5) applies to periods after 2008 where the property wasn't used as a main home — but business use within the same dwelling unit that occurred before the sale period doesn't necessarily trigger that fraction. The instructions to Form 4797 and Publication 523 both explain when the fraction applies.

Worth separating the two questions you're really asking: (1) does the whole building count as one dwelling unit for section 121 purposes, and (2) how is the gain allocated between excludable and taxable portions. Those have different answers and different forms.

Schedule D is where your ultimate exclusion ends up, with Form 8949 showing the sale and the exclusion as a negative adjustment in column (g). But what flows into those forms depends on whether Form 4797 is pulling out any recapture first. The order matters a lot here.

I sold a mixed-use property last year with a similar setup — business room on the main floor, lived there the whole time. I ran my depreciation history through Taxr and it listed out exactly what had been claimed on Form 8829 each year and what the unrecaptured section 1250 gain came to before I even touched Form 4797. That made the Schedule D entries much easier to reconcile. The one-dwelling-unit question for section 121 ended up being straightforward once the recapture piece was separated out.

Diego G.

Author

How did you handle the allocation between the 1250 recapture and the excluded portion on the actual forms? Did you end up needing a tax pro to sign off on it?

I did have a CPA review the final return because the numbers were large enough that I didn't want to guess. But having the depreciation history already organized saved a lot of billable time. The CPA basically confirmed what I'd already worked out from the form line by line.

One thing people miss: the section 121 exclusion doesn't apply to the gain attributable to depreciation allowed or allowable. "Allowable" is the word that bites people — if you qualified for the deduction but didn't take it, the IRS still counts it as if you had. So even if you forgot to claim depreciation some years, it still reduces your basis.

The separate-structure rule is what creates the hardest cases. If your business space had been a detached garage or a freestanding studio, the analysis would be completely different — you'd generally have to allocate the gain between that portion and your home, and the exclusion wouldn't cover the business portion unless you had also used it as a residence for 2 of the 5 years before the sale. Under one roof is a genuinely different situation.

For the ownership-and-use test, you said you owned and lived there since 2018 — that's well over two years in the five years before the 2026 sale, so the basic test is met for the whole structure assuming it's one unit. The part that gets prorated or recaptured is the depreciation, not the exclusion period itself.

Diego G.

Author

Right, I meet the 2-of-5 test with no problem. What I was worried about was whether the former business use somehow carved out that 30% and made it ineligible for the exclusion entirely. Sounds like under one roof changes that conclusion.

Under one roof, with no separate structure and no separate deed, the settled reading of Publication 523 and the 2008 legislation is that it stays one unit. Your remaining exposure is the depreciation recapture, not a separate-property carve-out.

If you used the actual expense method on Form 8829, your depreciation was based on the business-use percentage of the home's basis. The years you claimed it are what you need to add up to get to your total unrecaptured section 1250 gain. Your prior-year Schedule C returns and the Form 8829 attached to each should have that number by year.

Diego G.

Author

I have all the 8829s going back to 2018. So I can total the depreciation claimed in box 41 on each one — that's the number that goes into the recapture calculation?

Line 41 on Form 8829 is just the depreciation percentage; line 42 is the depreciation for the current year. What you want is the cumulative total across all years — add line 42 from each year's 8829 and that sum is your depreciation allowed, which reduces your adjusted basis and shows up as unrecaptured section 1250 gain on the sale.

Form 4797, Part III is where unrecaptured section 1250 gain from real property gets worked through, then flows to the unrecaptured section 1250 gain worksheet in the Schedule D instructions. I had a similar situation with a home I used partly for a photography studio and I uploaded all my prior 8829s to Taxr — it added up the depreciation across years and drafted the Part III entries so I could check them against what my preparer had before the return went out.

The unrecaptured section 1250 gain worksheet is in the Schedule D instructions, not on the face of Schedule D itself. That trips people up when they're looking for a specific line to enter it.

The nonqualified-use rules under section 121(b)(5) are worth looking at too if any period after 2008 and after you bought the place was used for something other than your main home. For periods before 2009, nonqualified use doesn't count against you even if the space wasn't residential. That 2008 cutoff is built into the fraction that Publication 523 walks through.

Worth adding: business use within the same dwelling unit is specifically excluded from the definition of nonqualified use under the statute, even for periods after 2008 when you were living there. The fraction only hurts you for periods when the whole property was rented out or sitting vacant, not for the in-home business room scenario.

If the gain is large enough that the recapture piece is significant, an enrolled agent or CPA who handles real estate dispositions is worth the cost. The interaction between Form 4797, the Schedule D unrecaptured section 1250 worksheet, and the section 121 exclusion is one of the spots where a small mistake in ordering flows through to a wrong tax amount.

A lot of this comes down to your adjusted basis calculation before you even get to the exclusion. Sale price minus adjusted basis gives you total gain; then recapture comes off the top; then section 121 shelters what's left up to the limit. If your adjusted basis is off — especially if you forgot to subtract depreciation — the whole chain is wrong.

Diego G.

Author

That's the order I had it in my head but wasn't totally sure about. Recapture first, then the exclusion applies to what remains above that.

The IRS self-employed tax center page doesn't get into section 121 much, but Publication 523 (Selling Your Home) is the dedicated resource and it has a full section on business use within the home. It's worth reading alongside the Schedule D instructions for the year of sale — the two together give you the complete picture on ordering and worksheets.

To bring the original question full circle: same structure, one deed, business use stopped before sale, owner-occupant the entire time — that's the fact pattern where section 121 treats it as one dwelling unit. The exclusion can apply to the full gain except for the depreciation recapture piece, which is unavoidable no matter how the unit question resolves.