Does a mixed-use building with storefront and apartment qualify as one dwelling unit for section 121 exclusion?

Bought a two-story building in 2018 for $420,000. Ground floor is a commercial storefront I rented to a bakery the whole time I owned it. Second floor is a two-bedroom apartment where I've lived as my primary residence for six years. Now I'm selling and my CPA mentioned the section 121 exclusion but said the mixed-use nature complicates things. I've been trying to figure out whether the whole building counts as one dwelling unit or whether only the apartment portion qualifies. I already know the $250,000 exclusion limit applies to me as a single filer but I can't find clear guidance on how to allocate between the commercial and residential parts. Does the storefront disqualify the whole thing or just get carved out separately?

33 comments

The storefront and the apartment are treated separately under section 121. The exclusion applies only to the portion of the property that qualifies as your principal residence. Because the commercial space was rented to a third party and you never lived in it, it isn't part of your dwelling unit. You'll need to allocate the sale price and your adjusted basis between the residential and commercial portions, typically by square footage or some other reasonable method, and only the residential side gets the exclusion.

Hannah S.

Author

That allocation piece is what I wasn't sure about. So the commercial portion gets treated as a straight investment sale with depreciation recapture and capital gains on that side?

Exactly. The commercial portion is Section 1250 property and any depreciation you claimed on it over the years is subject to recapture. The residential apartment portion has its own depreciation recapture issue too if you took depreciation on it, separate from the exclusion question.

Worth noting: even on the residential side, if you took depreciation deductions on the apartment because you rented it out at some point, the section 121 exclusion does NOT cover that depreciation recapture. That part is taxable regardless. The exclusion only covers the remaining gain above the recapture amount on the residential portion. A lot of people miss that.

Hannah S.

Author

I never rented the apartment, I lived there the whole time. So no depreciation on the residential side. But the storefront depreciation is a different story.

The allocation method matters more than people think. IRS doesn't mandate a single method but it has to be reasonable and consistent. Square footage ratio is the most common and usually holds up. If the commercial floor has significantly different ceiling heights or the total usable square footage is very unequal, you may want to document why you chose the method you did in case it's questioned later.

Had a nearly identical situation last year, two-story mixed-use, lived on top, rented the bottom commercial space the whole time. I uploaded my closing documents and my depreciation schedules to taxr.ai and had Taxr pull apart exactly which costs and which depreciation years applied to each portion. It drafted a summary showing the basis allocation by floor, which I then handed to my CPA to build the actual return. Saved a lot of back-and-forth. On the technical side: your two-year ownership and use test applies only to the residential unit, and you calculate that independently of what happens with the commercial side.

Hannah S.

Author

That's the workflow I need. Did the allocation summary change anything your CPA had initially calculated?

It caught that my CPA had included a roof replacement in the commercial basis when it should've been split proportionally since the roof covered both floors. Small difference but it mattered.

One more layer: the commercial storefront has been depreciated as nonresidential real property over 39 years under MACRS if placed in service after 1993. The apartment, if you'd been depreciating it, would be 27.5 years. These are different recovery periods and have to stay separate on Form 4562. At sale, any unrecaptured section 1250 gain on the commercial side is taxed at a maximum 25% rate for most taxpayers, though your bracket determines the exact outcome.

Does the two-year use test run from when you moved in, or from the closing date of purchase? I always get confused on this.

The use test is two years of use as your principal residence out of the five years ending on the sale date. Ownership and use can overlap but they're tracked separately. You need both: two years owned AND two years used, within that five-year window.

OK so if the OP has lived there six years the use test is clearly satisfied. The question is really just the allocation and the depreciation on the commercial part.

I want to push back slightly on the idea that you just split by square footage automatically. If the commercial space is significantly more valuable per square foot (street-level retail often is), the IRS could argue a value-based allocation is more accurate. Talk to your CPA about whether square footage or fair market value allocation better reflects the actual economics of your building.

This is a fair point. Publication 527 doesn't address mixed-use commercial/residential allocation directly for section 121 purposes. The instructions lean toward reasonable and consistent rather than prescribing a method, so documenting your rationale is key either way.

Went through this two years ago with a storefront/apartment building I sold. I uploaded the settlement statement and my prior Schedule E filings to Taxr and it walked through each line of the depreciation recapture calculation for the commercial portion, including identifying which improvements I'd expensed versus capitalized. Helped me understand what I was actually handing my CPA before the meeting so I wasn't lost. On your specific question: the commercial portion's gain goes on Schedule D and Form 4797, while the residential sale is reported on Form 8949 with the exclusion claimed there (code H) and then carried to Schedule D.

Hannah S.

Author

Form 4797 for the commercial side, I didn't realize that. So two separate transactions reported on the same return basically.

Right. The commercial portion is a business or investment property sale so it goes through 4797, where straight-line MACRS real property has no ordinary recapture piece; the gain flows to Schedule D, with the depreciation part taxed as unrecaptured section 1250 gain at up to 25%. The residential apartment portion with the 121 exclusion goes on Form 8949 and then Schedule D. Your CPA will know how to run them together.

The real trap in these mixed-use sales is not having good records of which improvements went to which part of the building. A new HVAC unit that only serves the apartment is 100% residential basis. One that serves both floors needs to be split. If your records are messy this is worth cleaning up before you close because it directly affects your recapture calculation.

Hannah S.

Author

My HVAC is separate units per floor thankfully. The roof is shared and I just found out that's where I need to be more careful.

Quick clarification on something in this thread: someone mentioned the 121 exclusion amount without specifying it. The dollar limit and any phase-outs for the section 121 exclusion should be confirmed in the current year instructions for Schedule D, since you're asking about a future sale. Don't assume prior year numbers.

Does any of this change if the commercial tenant's lease is still active at closing? Like does the sale count as a sale of rental property in that case?

An active lease at closing doesn't change the classification of the property itself. The commercial portion is still a sale of business or investment property. The lease transfers to the buyer as a contract assignment unless the lease says otherwise. It doesn't affect the depreciation recapture or the section 121 analysis on the residential side.

Something I'm not seeing addressed: if you used any part of the apartment as a home office and deducted it on a Schedule C or similar, that office space is still part of the dwelling unit for section 121 purposes and isn't carved out of the exclusion, but any depreciation you claimed on it after May 6, 1997 can't be excluded. Home office depreciation can create taxable gain on the residential side.

Hannah S.

Author

I work remotely but never claimed a home office deduction. So there's no home office depreciation that would apply to me.

Then you're in the cleaner situation. The home office issue trips up a lot of people who claimed it in prior years without realizing it affects the 121 exclusion down the road.

Before I sold my mixed-use property last spring I uploaded all six years of depreciation schedules and the purchase HUD statement to Taxr and had it list every capitalized improvement sorted by which floor it affected. I gave that organized list to my enrolled agent and it cut the prep time significantly. For the section 121 question itself: the residential portion's exclusion eligibility stands on its own as long as you meet ownership and use, completely independent of what happens on the commercial side of the same building.

Hannah S.

Author

An enrolled agent handled yours? I've been going back and forth on whether my regular CPA can handle this or if I need someone with more real estate background.

My CPA handed it off to an EA in his firm who focused on real estate. If your CPA handles mixed-use sales regularly you're fine, but if they hesitate on the Form 4797 and section 121 interaction, that's a signal to find someone who does this more often.

The state tax side can also differ. Some states don't conform to the federal section 121 exclusion fully, or they have their own limits. Worth a separate conversation with your preparer about your state return, especially since the exclusion amount and the commercial gain treatment may be computed differently at the state level.

To make sure the thread has the full picture: the section 121 exclusion covers the gain on the residential portion minus any depreciation recapture on that portion. But in your case since you never rented the apartment and never took residential depreciation, your recapture amount for the residential side is zero. The gain you need to calculate is: residential sale price minus residential adjusted basis. If that gain is under the exclusion limit for your filing status, the entire residential gain is excluded. The commercial side is fully taxable with recapture.

Hannah S.

Author

That actually lays it out clearly. So my main taxable event is entirely on the commercial storefront side, and the apartment gain could be fully excluded if it stays under the limit.

Correct, as long as your residential gain stays within the section 121 limit and you meet the ownership and use tests, which at six years of residence you clearly do. The commercial recapture and gain are separate and fully taxable.