The short answer
Split the building on paper before you sell it. Rev. Proc. 2005-14 settles the order: section 121 is applied to the gain first, and section 1031 then defers whatever is left on the business and rental share, including the post-1997 depreciation that section 121 cannot exclude. If you live in one of the apartments, that unit is a separate dwelling unit from the store, so basis and sale proceeds have to be divided between the living space and the income space by whichever method your depreciation schedules already used. Everything you did not occupy — the store and the other apartments — is straightforward exchange property.
At a glance
| Order of operations | Rev. Proc. 2005-14 §4.02(1): §121 is applied to realized gain before §1031 |
|---|---|
| Depreciation carve-out | §121(d)(6) denies exclusion for post-May 6, 1997 depreciation; §1031 can still defer it |
| Boot softener | §4.02(3): cash counts only to the extent it exceeds the §121 gain on the business share |
| Basis add-back | §4.03: gain excluded under §121 increases the basis of the replacement business property |
| Allocation method | Reg. §1.121-1(e)(3): match the depreciation method; square footage is accepted |
| Exclusion limits | §121(b): $250,000, or $500,000 on a qualifying joint return |
| Depreciation life test | §168(e)(2)(A): 27.5 years only if 80%+ of gross rental income is from dwelling units |
Section 121 runs first and section 1031 takes what survives it
Rev. Proc. 2005-14 is the only authority that tells you how the home-sale exclusion and the like-kind rules share a single closing, and its section 4.02(1) is blunt: the exclusion is taken against realized gain first, and only then does the like-kind rule work on what remains.
Two consequences follow. Section 121 cannot shelter gain attributable to depreciation taken after May 6, 1997 under §121(d)(6), but section 1031 can defer exactly that gain. And cash received in the deal is counted as boot only for the amount by which it overtops the excluded gain on the business portion.
The revenue procedure's own Example 4 shows the effect: a taxpayer receives $10,000 of cash, excludes $50,000 on the business share, and recognizes nothing, because the boot never rises above the excluded amount.
Worked example: a $900,000 building that is one-fifth residence and four-fifths income property
Use round hypothetical numbers. A single owner bought a storefront with three apartments above for $300,000, lives in one apartment, rents the other two and leases the shop, so by square footage the owner's own unit is 20% of the building. Depreciation of $120,000 has been claimed on the 80% that is business and rental space, and the building now sells for $900,000.
The residence share: amount realized $180,000 against a basis of $60,000, so $120,000 of gain, all excluded under section 121 because it is well inside the $250,000 limit and the owner meets the two-of-five-year test.
The income share: amount realized $720,000 against a basis of $240,000 reduced by $120,000 of depreciation, so an adjusted basis of $120,000 and $600,000 of gain. All $600,000, including the $120,000 attributable to depreciation, can be deferred by exchanging into replacement property worth at least $720,000. Have your CPA or attorney confirm the split against your own depreciation schedules.
- Residential 20%: $180,000 realized, $60,000 basis, $120,000 gain, excluded.
- Business and rental 80%: $720,000 realized, $120,000 adjusted basis, $600,000 gain, deferred.
- Replacement target for full deferral on the business share: $720,000 of like-kind value.
- Basis carried into the replacement: $120,000, plus any section 121 gain allocable to the business share.
Your own apartment is a separate dwelling unit from the shop, so you have to allocate
The distinction that decides this is whether the non-residential use sits inside your dwelling unit or outside it. Rev. Proc. 2005-14 paragraph .03 explains that where the business portion is separate from the dwelling unit used for residential purposes, the gain allocable to the business portion is not excludable unless you also met the two-year use test for that portion.
A ground-floor store and the tenants' apartments are plainly outside the unit you live in, using the section 280A(f)(1) meaning of dwelling unit, so allocation is required and the pattern follows the revenue procedure's Example 2 rather than its Example 3.
The contrast is worth knowing. In Example 3, an office occupying a third of a single house needs no allocation for the use test, and section 121 can shelter that third's gain apart from depreciation. A live-work loft with no physical separation can fall on that side of the line; a storefront almost never does.
Square footage is an accepted split, but it has to match how you depreciated
Reg. §1.121-1(e)(3) requires you to allocate basis and amount realized using the same method you used to determine depreciation adjustments, and the revenue procedure cites Poague v. United States as authority that square footage is an appropriate method.
That is a constraint, not a choice. If your depreciation schedules have used a 70/30 split for fifteen years, a 50/50 split at closing to enlarge the exclusion will not survive a look at the returns.
Where the store carries a far higher value per square foot than the apartments, an appraisal that allocates by value is defensible only if it is the method the depreciation followed. Fix the method before the listing, not on the settlement statement.
The 80% gross-rent test decides whether the replacement depreciates over 27.5 or 39 years
Mixed-use property has a second, quieter tax consequence. §168(e)(2)(A) defines residential rental property as a building where 80 percent or more of gross rental income for the year comes from dwelling units, and the statute adds that if you occupy part of the building, the rental value of your own space counts in that gross rental income.
Above the line, the recovery period is 27.5 years; below it, 39. On a main-street building where the commercial rent is a large share of the total, the whole structure is nonresidential real property and depreciates a third more slowly.
That makes the replacement choice a cash-flow decision as well as a risk decision. A pure apartment building restores the 27.5-year life on the carried-over basis, while a net-leased commercial replacement keeps you on 39 years.
If you may live in the replacement one day, a five-year clock starts at closing
§121(d)(10) denies the home-sale exclusion on any property you acquired in a section 1031 exchange if you sell it within five years of acquiring it, regardless of how long you lived there.
Section 121(b)(5) then limits the exclusion further by the periods of non-qualified use after 2008, so converting an exchanged rental into a residence gives you a partial exclusion at best. Former home turned rental and using a 1031 to buy a future retirement home cover that path in detail.
For most main-street sellers the cleaner plan is to keep the two halves apart: bank the section 121 exclusion on the apartment you occupied and move the income share into passive replacement property such as a traditional DST, a net-leased building or a direct title security. Breakwater Exchange is a 1031 exchange broker licensed in every state inside a regulated broker-dealer framework, after twenty-plus years of this work and a billion dollars and more of DST transactions. The form on this site opens the conversation.
Related questions
Can I really use both the exclusion and the exchange on one sale?
Yes, and Rev. Proc. 2005-14 exists to say how. Section 121 applies first to the residential share and to any gain on a business area inside the same dwelling unit; section 1031 then defers what remains on the business share.
Does the gain I exclude change my basis in the replacement?
Yes. Section 4.03 of the revenue procedure treats excluded gain as recognized for basis purposes, so the basis of the replacement business property is increased by any section 121 gain attributable to the relinquished business portion.
Two of the four units are vacant. Does that hurt the exchange?
Not by itself. What matters is that the property was held for investment or business use, not that it was fully leased on the closing date, though vacancy will affect the price and the lender.
I moved out of the apartment two years ago. Am I too late for the exclusion?
Not necessarily. Section 121 requires two years of ownership and use within the five years ending on the sale date, so an owner who left recently can still qualify on the residential share.
Do lenders treat mixed-use buildings differently?
Usually yes, because the commercial share pushes the loan out of residential underwriting and into commercial terms. Confirm the financing on the replacement before day 45, not after.
Sources
Checked against these publications on September 19, 2026. Rules and figures change; confirm the current version with your CPA or attorney before you act. This page is general information, not tax or legal advice.
