On this page
When you sell a duplex you've lived in, the IRS asks about each unit separately. The unit that was your home can use the Section 121 exclusion if you pass its ownership and use tests. The unit you rented out is taxed on its gain, the part that came from depreciation at up to 25 percent, and that half of the sale can go into a 1031 exchange.
- The exclusion is up to $250,000 of gain, or $500,000 on a joint return, for a home you owned and lived in for at least 24 months of the 5 years before the sale.
- The rented unit is separate from your home, so the exclusion reaches only the gain allocable to the unit you lived in.
- Depreciation allowed or allowable after May 6, 1997 can't be excluded, and that part of the gain is taxed at a maximum 25 percent rate.
- IRS guidance lets the exclusion and a 1031 exchange both apply to one sale.
How the IRS splits a duplex
IRS Publication 523 says that when a property was partly your home and partly a business or rental, what happens to the gain turns on whether the rental part was inside your home or separate from it. A room you rented out inside your own unit counts as part of your home. The other unit of a duplex is a dwelling of its own, with its own kitchen and front door. Where part of a property separate from the dwelling unit was used for nonresidential purposes, the IRS says, only the gain allocable to the residential portion is excludable.
So your one sale gets handled as two. The price, your basis and your selling costs are split between the unit you lived in and the unit you rented, and each share follows its own rules. How to divide them, and how to write the method down, is your CPA's call. Shaya isn't a CPA or a tax advisor, so have your CPA run these numbers before you list.
The exclusion for the unit you lived in
Under IRS Topic 701, you can exclude up to $250,000 of gain on the sale of your main home, or up to $500,000 if you file jointly with your spouse, as long as you pass both of these tests:
- Ownership. You or your spouse owned the home for at least 24 months of the 5 years before the sale.
- Use. You lived in it as your residence for at least 24 months of those same 5 years. On a joint return, either spouse can meet the ownership test, but both have to meet the use test.
The full conditions, the exceptions and the worksheets are in Publication 523. To see how the cap works, take a made-up example. Say the gain allocated to your unit is $300,000 and you pass both tests. File jointly and all of it could be excluded. File single and $250,000 could be, which leaves $50,000 taxable before depreciation even comes into it.
The rented unit and depreciation recapture
The rented unit's share of the gain sits outside the exclusion, so it's taxable. Part of it is your depreciation coming back. You depreciate a rental while you own it, and Publication 523 says you can't exclude the part of your gain equal to depreciation allowed or allowable for periods after May 6, 1997. Allowed is what you deducted. Allowable is what you were entitled to deduct, so if you skipped the deduction on past returns, the recapture still applies.
IRS Topic 409 taxes that portion, called unrecaptured section 1250 gain, at a maximum rate of 25 percent. The rest of the rented unit's gain falls under the regular capital gain rules the same topic describes.
To see how the split falls on your own sale, enter the price, what you paid plus improvements, the share of the duplex that was your home, and the depreciation taken on each unit. Your CPA's allocation replaces the share you enter here.
Split the gain between your unit and the rental
Your numbersThe unit you lived in
- Gain
- -
- Excluded under Section 121
- -
- Taxable
- -
The rented unit
- Gain
- -
- Of it, depreciation taxed at up to 25%
- -
- Of it, the rest of the capital gain
- -
- Taxable gain before any 1031 exchange
- -
Arithmetic on your numbers under IRS Publication 523, not tax advice. The rented unit's share can go into a 1031 exchange, which this does not model. California's tax on the sale is a separate question for your CPA.
Your own unit can carry some of this too. If you ever depreciated part of it, for a home office, say, or for a stretch when you rented your side out, Publication 523 says gain equal to that depreciation can't be excluded either, even if the rest of your unit's gain can be. How California taxes the sale is a separate question to put to your CPA.
Splitting the sale with a 1031 exchange
Because the rented unit is real property held for investment, its share of the sale can go into a like-kind exchange. The IRS page on like-kind exchanges for real estate says section 1031 now applies only to real property, and that real properties are generally like-kind to one another, improved or not. The rental half of your duplex could go into another rental building, then, or into land held for investment.
You can use the exclusion and an exchange on the same sale. Rev. Proc. 2005-14, published in Internal Revenue Bulletin 2005-7, is the IRS's guidance on applying both to a single exchange. Publication 523 adds that excluding gain under section 121 doesn't stop you from deferring some or all of the remaining gain under section 1031, as long as every section 1031 requirement is met. In a duplex, your unit takes the exclusion and the rental's share goes into the exchange.
The deadlines are strict. From the day the sale closes you have 45 days to identify replacement property in writing, signed and delivered to someone involved in the exchange, such as the qualified intermediary. You then have to receive the replacement property by whichever comes first: 180 days after the sale, or the due date of your return for that year, with extensions. Both clocks start at your closing, so bring in your CPA and an exchange intermediary before you accept an offer.
If you moved out before selling
The use test only counts the months you lived there inside the 5 years before the sale. Years before that window don't help. So if you moved out more than three years before the sale and never moved back, fewer than 24 months of your time there fall inside the window, and the test fails however long you had lived there before. Once you rent your old unit out, the depreciation for that rental period can't be excluded either. Publication 523 has more rules about periods of rental use, and your CPA will apply them to your dates.
Moving out changes your rent control position too, because the owner-occupied exemptions from the state cap and the City's Just Cause Ordinance assume you still live there.
What to bring to your CPA
- The closing statement from when you bought the duplex.
- Records of improvements, with a note of which unit each one served or whether it served the whole building.
- Past tax returns showing the depreciation taken on the rental unit.
- The dates you lived in the duplex, and any stretch when you rented out your own unit.
- Rent records and leases for the rented unit.
- Whether you've excluded gain on another home sale, and when.
- If you're considering an exchange, what kind of property you'd buy.
Once your CPA has a plan, Shaya can time the sale around it, including the 45-day identification window if you exchange the rental half.