Depreciation recapture when selling primary home after renting out the basement

We've owned our house for 11 years and rented the basement apartment separately for the last 6 of those. Filed Schedule E every year, took depreciation on the basement square footage. Now we're listing the house and I realized I have no idea how the depreciation recapture works when selling a primary home after renting out the basement. The basement is roughly 28% of the total square footage. We used an appraiser's allocation when we started renting to split the basis. We've taken depreciation each year on that portion. I know Section 121 gives us the exclusion on the residential portion, but I've read conflicting things about whether the basement portion gets any exclusion at all, or whether it's fully taxable as recapture plus capital gain. Our gain is large enough that this really matters. What actually happens on the forms when we sell?

33 comments

Form 4797 is where the rented-portion gain ends up, at least the part attributable to depreciation recapture. The accumulated depreciation you took on that basement is taxed as unrecaptured Section 1250 gain, which is a separate rate category from ordinary long-term capital gain. It doesn't get sheltered by the Section 121 exclusion. The way the IRS looks at it: you have to allocate the sale price between the rented portion and the personal-use portion, the same ratio you used to split expenses on Schedule E. The personal-use portion can still qualify for Section 121. The rented portion's gain — above the recaptured depreciation — goes to Schedule D as long-term capital gain if you've held more than a year.

Greg S.

Author

This matches what I was afraid of. So the basement piece basically gets treated like a separate mini-property sale inside the same transaction, right? Two different gain calculations running side by side.

Exactly that. Same property, same closing, but two separate gain computations. The allocation percentage you used on Schedule E each year is the percentage you apply to the sale price and to your adjusted basis for the rented portion.

One clarification on Form 4797: the depreciation recapture on residential rental property (27.5-year MACRS) is unrecaptured Section 1250 gain, taxed at a maximum rate. It goes on the Unrecaptured Section 1250 Gain worksheet in the Schedule D instructions, not as ordinary income the way Section 1245 recapture would be. The rate question is answered in that worksheet; check your Schedule D instructions for the current year because the worksheet walks through it line by line.

Schedule D instructions page on that worksheet tripped me up the first time too. The numbers feed from Form 4797 Part III into the Schedule D worksheet. Easy to miss if you're not expecting a secondary worksheet.

Something people get confused about is whether the basement qualifies for Section 121 at all. The IRS position for a structure that is part of the same dwelling unit — like a finished basement that is part of the main building — is different from a structure that is a truly separate unit on the same lot. If the basement is part of the same building, some practitioners argue the whole property can qualify under Section 121 as one unit, with depreciation recapture carved out but the remaining gain excluded. If it's a legally separate unit that you rented, the allocation approach the other comment describes is more clearly correct. Your situation may depend on how local law and your deed treat it.

Greg S.

Author

It's definitely the same structure — basement of the main house, same foundation, same roof. We never got a separate parcel number. Does that change how the allocation works?

Same structure on the same parcel points toward the "within the home" analysis. The IRS addresses this in Publication 523 (selling your home) but the depreciation recapture still gets carved out regardless — Section 121(d)(6) specifically says the exclusion doesn't apply to gain attributable to depreciation claimed after May 6, 1997. So at minimum the accumulated depreciation is still taxable.

Form 4797 Part III is the right starting point. I went through almost this exact calculation last year — rented one floor of my house for four years, then sold. I uploaded my depreciation schedules and the sale closing disclosure to taxr.ai and it mapped out which depreciation amounts fed into the unrecaptured 1250 gain worksheet versus which portion of the gain could flow to Schedule D as straight long-term capital gain. That separation was what I kept getting wrong on my own. Worth doing before you hand numbers to your preparer so you at least know what you're checking.

Greg S.

Author

Knowing what to check before meeting the preparer is exactly why I posted. Did it flag anything about the allocation between the rented and personal portions, or was that something you had already done separately?

The allocation I had already done using the same square-footage ratio from my Schedule E. What it caught was that I had the wrong adjusted basis — I'd forgotten to subtract the accumulated depreciation from cost basis before computing gain, which is a step that changes the number significantly.

Adjusted basis is where people mess this up. Your basis in the rented portion is NOT your original allocated cost. It's original allocated cost minus every dollar of depreciation you've deducted on Schedule E over the years. If you've had the basement rented for 6 years that's 6 years of annual depreciation deductions reducing your basis, which inflates your gain on that portion. Add up every Form 4562 or the depreciation line on each year's Schedule E and make sure you have the cumulative total before you do any gain calculation.

Schedule E line 18 (depreciation expense) for each of the 6 years is the quickest place to pull those numbers if you don't have a formal depreciation schedule. Sum them all up — that's your accumulated depreciation.

Greg S.

Author

We did use a tax preparer each year so the Form 4562 is in every return. I'll pull all six and add the depreciation line. Hadn't thought through the fact that the basis keeps dropping each year you take the deduction.

Another thing: make sure you know the depreciation basis that was actually used in year one. If you allocated purchase price using square footage but the original return used an appraiser's allocation instead, whichever number was used in year one is what controls. Using a different number now would create a discrepancy the IRS can spot if they ever compare your Form 4797 to the prior Schedule E returns.

The passive activity loss angle is worth checking too. If you had any years where the Schedule E loss was suspended under Form 8582 because your income was too high to claim the full $25,000 special allowance, those suspended losses free up and become deductible in the year of sale. They don't disappear — they release when you dispose of the whole activity. Check each prior year's Form 8582 carryforward if your MAGI was anywhere near the phase-out range.

Greg S.

Author

Our MAGI has been above $150,000 for most of those years so I think the losses were fully suspended each year. This is actually the first I realized the sale unlocks them. That could offset some of the recapture income.

Form 8582 Part I is where the prior-year unallowed losses show up each year (line 1c for rental real estate with active participation), carried in from the worksheets in the Form 8582 instructions. The total carryforward on those worksheets is what gets released in the disposition year. If your preparer filed Form 8582 each year you should be able to pull the carryforward from last year's copy.

Section 121 exclusion eligibility on the personal-use portion still requires the two-out-of-five-years ownership and use tests. If you've lived in the home as your primary residence for at least two of the five years before the sale you should still qualify for the exclusion on the personal-use portion's gain (above the depreciation recapture, which is always excluded from Section 121 by the statute). Confirm your dates before assuming it applies — a sale that closes before you hit the two-year mark doesn't qualify.

Greg S.

Author

We've lived here continuously for 11 years, so the ownership and use tests aren't an issue. Good reminder though for anyone reading this in a different situation.

Form 8582 carryforward release on disposition is something I had to work through carefully. I gave Taxr the last three years of my returns along with the settlement statement from my sale and it pulled out the cumulative suspended loss from the Form 8582 carryforward column, then showed me how it compared against the gain I was reporting — made it much easier to present the full picture to my CPA before she did the final return. Saved a lot of back-and-forth.

Form 8582 carryforwards are easy to lose track of across multiple years. Having that number reconciled before you hand the file to a preparer means they're not starting from scratch reconstructing your passive loss history.

Don't forget state taxes. Many states don't follow federal depreciation recapture rules exactly, and some don't have a capital gains preference rate at all, meaning the unrecaptured Section 1250 gain might just be taxed as ordinary income at your state rate. Worth a separate conversation with your preparer about the state return, especially if your state has its own depreciation rules that may have produced different accumulated depreciation than the federal figures.

The closing disclosure from escrow will show the gross sale price. The key document you need on the other side is a schedule of your original purchase allocation (building versus land, then the rented portion versus personal-use portion) and the cumulative depreciation schedule. If you're missing any year's Form 4562, you can get transcripts of prior returns from the IRS — a return transcript will show most line items from what was filed (a wage and income transcript only shows the W-2s and 1099s reported to the IRS, not your return), and Form 4506 gets you a full copy of the return including Form 4562.

Greg S.

Author

Getting transcripts is a good backup plan. We have most of the actual returns but I'd want to verify the depreciation numbers match what was actually filed, not just what's in our copies.

The place this gets complicated fast is when the rented portion generated both depreciation recapture AND a capital gain above that — because those two pieces are taxed differently and the worksheet math has to stay separate through Form 4797 Part III all the way to the Schedule D Unrecaptured Section 1250 Gain worksheet. I gave Taxr my Schedule E returns for the rental years and the draft Form 4797 my preparer sent for review, and it flagged that the gain above recapture wasn't flowing correctly to Schedule D — the two numbers had been combined instead of separated. Caught it before filing.

Form 4797 Part III line 26g only shows the section 1250 ordinary-income recapture, which is usually zero for straight-line residential rental property. The unrecaptured 1250 gain is figured on the Unrecaptured Section 1250 Gain Worksheet in the Schedule D instructions and carried to Schedule D line 19. If those two items get lumped, the tax ends up wrong — usually understated on the recapture side.

Greg S.

Author

Two gain numbers getting merged on a draft is something I'd never have spotted by myself. Having a draft to review before it's filed seems critical here.

Worth noting: land doesn't get depreciated, so when you do your allocation make sure the land value is stripped out first before splitting the building basis between rented and personal use. If your original allocation put, say, 20% of purchase price to land, that piece generates only capital gain on sale — no depreciation recapture because no depreciation was ever taken on it.

Basis allocation order matters a lot: land out first, then building basis, then rented vs. personal-use split within the building. Getting the order wrong throws off everything downstream.

For a situation this layered — 6 years of rental, suspended passive losses, partial-use primary home, significant gain — this is squarely a job for a CPA or enrolled agent who handles real estate, not just a general preparer. The interaction between Form 8582 release, Form 4797 recapture, and Section 121 exclusion on the same return is easy to get wrong and the IRS matches prior-year depreciation against what you report on disposition. The cost of getting it reviewed by someone who does this regularly is small relative to the stakes.

Greg S.

Author

Agreed — we're definitely hiring a CPA for the sale year return. This thread has given me the vocabulary to have a real conversation with them and know what to look for when I review the draft.

If you want to work through the numbers yourself before meeting your preparer, the IRS rental property guide (Publication 527 on irs.gov) lays out residential rental depreciation and the basis rules in detail. The section on depreciation walks through how the 27.5-year MACRS schedule works and how basis is adjusted each year. Having a solid grasp of those mechanics makes it much easier to spot if something looks off on the final return.