Selling a Home With an ADU: How Capital Gains Tax Works

The short answer: When you sell your main home, you can usually exclude up to $250,000 of gain, or $500,000 if married filing jointly, if you owned and lived in it for at least two of the last five years. An ADU changes that in two ways. If you rented the ADU as a separate unit, the gain on that part generally has to be allocated and cannot be excluded. And whatever the layout, gain equal to the depreciation you claimed (or could have claimed) on a rental cannot be excluded.

Last verified: October 28, 2026 · Written by Marc

This guide summarizes federal rules in IRS Publication 523 (2025 returns). It is general information, not tax advice. A sale is a one-time, high-stakes event, so have a CPA or enrolled agent review your numbers before you list.

An ADU can add value to your property, and it can also complicate the tax bill when you sell. Many owners assume the home sale exclusion covers everything on the lot. It covers your home, and the IRS looks closely at any part of the property you used to earn rent. This guide explains how the exclusion works, why a rented detached ADU is treated differently from a rented spare room, and how to estimate the taxable part with a worked example.

How the home sale exclusion works

Section 121 of the tax code lets you exclude a large share of the gain on the sale of your main home. Publication 523 sets the core numbers: you may exclude “the first $250,000 of gain,” and the exclusion “is increased to $500,000 for a married couple filing jointly.”

House with white columns and a covered porch in Los Angeles
Section 121 lets you exclude a large share of the gain on the sale of your main home.

To qualify, you generally need to pass two tests in the five years before the sale:

  • Ownership: you owned the home for at least 24 months.
  • Residence: you lived in it as your main home for at least 24 months. The IRS notes these months “can fall anywhere within the 5-year period,” so they do not have to be continuous.

Your main home is the one where you spend most of your time, and the IRS says “an individual has only one main home at a time.” Gain is the sale price minus selling costs and your adjusted basis, which is broadly what you paid plus improvements, minus depreciation you claimed.

Building an ADU is an improvement, so its cost generally increases your basis. Keep the construction invoices for as long as you own the property: they reduce your gain when you sell.

Why a rented ADU is treated differently

The exclusion is for the home you live in. If part of the property earned rent, the IRS asks where that part is. Publication 523 draws a line between space inside your living area and a separate part of the property.

Two-story house with a front lawn and a driveway in Los Angeles
The exclusion is for the home you live in, so the IRS asks where the rented part is.
How the space was usedExample from IRS guidanceDo you split the gain?
Rental or business space within your home’s living areaA rented spare bedroom, a home officeNo allocation of gain, but depreciation after May 6, 1997 is still taxable
A separate part of the property used for rentA duplex where you rented one unitYes: the gain on the separate part generally cannot be excluded
A detached ADU you rented to tenantsNot named in the guide; generally closest to the duplex caseUsually yes; confirm with a tax professional
An ADU you used only for family or guests, never rentedNo rental useGenerally no split; it is part of the home

For the separate part, the IRS states that “you generally can’t exclude gain on the separate portion of your property used for business or to produce rental income.” In that case “an allocation of the gain on the sale is required.”

A detached ADU rented to a tenant looks much more like the duplex example than a spare bedroom. Attached ADUs and JADUs sit closer to the line, because they share walls with the house. Whether yours counts as part of the living area depends on the facts, which is why this is the point to get advice rather than guess.

Common mistake: assuming the $250,000 or $500,000 exclusion covers the whole lot because the ADU sits on the same parcel. If the ADU was a rental unit outside your living area, part of the gain is probably taxable even if you lived in the main house the whole time.

Depreciation always comes back

If you rented the ADU, you were entitled to depreciate it while it was rented. That deduction lowered your taxes then, and it is recovered when you sell. Publication 523 says that for rental use after May 6, 1997, “you can’t exclude the part of your gain equal to any depreciation allowed or allowable.”

Two words in that sentence matter. “Allowed” means depreciation you actually claimed. “Allowable” means depreciation you could have claimed, even if you never did. Skipping depreciation while you rent does not protect you later; it only means you lose the deduction and still face the gain.

This is why the depreciation rules in our guide to ADU rental income taxes matter long before a sale. Claim what you are entitled to each year and keep a running total. Your preparer will need it on the day you sell.

A worked example with an ADU

The numbers below are hypothetical and simplified. They show the order of the calculation, not your tax bill. A real allocation follows the worksheets in Publication 523.

A married couple bought a house for $500,000 and later spent $200,000 building a detached ADU, which they rented to tenants for six years. They lived in the main house the whole time and file jointly. They sell the property for $1,300,000, with $70,000 of selling costs.

  1. Total basis: $500,000 purchase + $200,000 ADU = $700,000, before depreciation.
  2. Depreciation claimed on the ADU: roughly $200,000 ÷ 27.5 years × 6 years, about $43,600.
  3. Adjusted basis: $700,000 − $43,600 = $656,400.
  4. Total gain: $1,300,000 − $70,000 − $656,400 = $573,600.
  5. Allocate the gain between the home and the rented ADU, using a reasonable method such as square footage or relative value. If the ADU is 25% of the property, about $143,400 of gain belongs to the ADU and $430,200 to the home.
  6. Apply the exclusion to the home part only. The $430,200 is below the $500,000 limit, so it can generally be excluded.
  7. What remains taxable: the ADU’s share of the gain, about $143,400, which includes the depreciation that cannot be excluded.

Without the ADU rental, the same couple might have excluded their entire gain. With it, part of the sale is taxable. The example also shows that the ADU still raised the sale price; the tax is a cost of that gain, not a loss.

Ways to plan before you sell

You cannot change how the property was used in the past, but you can avoid surprises and keep the records that reduce your tax.

  • Keep every construction invoice. The ADU’s cost adds to your basis, and without proof you cannot use it.
  • Track depreciation year by year, including any year you forgot to claim it.
  • Write down how the ADU was used, and when: rented, used by family, empty or used as part of the house.
  • Ask about the allocation method early. Square footage and relative value can give different answers, and your preparer should choose and document one.
  • Check state rules. Your state may tax the gain differently, and some states have their own rules on residency and exclusions.
  • Talk to a tax professional before you sign a listing agreement, not after you close. Timing can matter, including the two-out-of-five-year test and periods of nonqualified use.

Practical tip: If you plan to sell within a few years, ask your preparer to run the sale on paper now, with this year’s estimated value. You will see how much of the gain is likely to be taxable while you still have time to plan.

Special situations to raise with your preparer

Some situations change the math enough that they deserve a direct question to a professional:

  • You lived in the ADU yourself. If you moved into the ADU and rented the main house, the facts change which part was your home.
  • The house was rented before you lived in it. Publication 523 says that any period after 2008 when the property was not your main residence is generally nonqualified use, and gain allocated to it generally cannot be excluded, with exceptions.
  • You sell the ADU separately as a condominium. Where this is allowed, it is a separate sale of a separate unit. Our guide to selling an ADU separately in California explains when it is possible.
  • You rented a room or JADU inside the house. This may fall within the living area, where no allocation is needed, but depreciation is still taxable.

Frequently asked questions

Does the $250,000 exclusion cover my ADU?

It covers the part of the property that was your home. If the ADU was never rented and was used as part of your home, the whole property is generally treated as your home. If you rented the ADU as a separate unit, the IRS generally requires you to allocate the gain, and the ADU’s share cannot be excluded. Depreciation from rental use is taxable in either case.

What if my ADU is attached to the house?

It depends on whether the rented space counts as part of your living area. Publication 523 says rental space within the living area, such as a rented bedroom, needs no allocation of gain, while a separate portion, such as one unit of a duplex, does. An attached ADU with its own entrance and kitchen may look more like the second case. A tax professional can review the facts.

Do I pay tax on depreciation I never claimed?

Yes, potentially. The IRS rule covers depreciation “allowed or allowable,” which means the depreciation you were entitled to claim during rental use, whether or not you claimed it. Not claiming it does not reduce the taxable gain at sale; you simply lose the deduction. If you missed prior years, ask a preparer whether you can correct it before you sell.

How do I split the gain between the house and the ADU?

The IRS expects a reasonable allocation. Common methods are square footage and relative fair market value, for example from an appraisal that values the main house and the ADU separately. Use one method consistently and document how you chose it. The worksheets in Publication 523 show where the allocated amounts go when you figure the exclusion.

Can I avoid the tax by moving into the ADU before I sell?

Not simply. The residence test looks at where you lived during the five years before the sale, and periods when a part of the property was rented still affect the allocation and depreciation. Short moves made only before a sale rarely change much. If you are considering a real change of residence, plan it with a tax professional well in advance.

The bottom line

Selling a home with an ADU still lets you use the home sale exclusion of up to $250,000, or $500,000 for joint filers, on the part that was your home. If you rented a detached ADU, expect to allocate part of the gain to it and pay tax on that part, and remember that rental depreciation is taxable whatever the layout.

Your next step is to gather the ADU’s construction costs, your depreciation records and the dates of rental use, then ask a CPA or enrolled agent to run the sale on paper before you list. For the rules in full, read IRS Publication 523.

Sources

General information, not financial or tax advice. Rules change; confirm every figure with a qualified professional.

Cover photo: “SD17Gallery of Houses (37434907046)” by U.S. Department of Energy Solar Decathlon, public domain, via Wikimedia Commons.

Questions or a correction?

If something in this guide is unclear, out of date or does not match what your city told you, send me a message. Include the source if you have one.

I agree that AduNorth may store my name, email and message to reply to me, as described in the Privacy Policy.