Skip to main content

Selling Your Home After Claiming Home Office Depreciation: What Section 121 Excludes and What It Doesn't

Published 10 min readMike ThriftMike Thrift
Selling Your Home After Claiming Home Office Depreciation: What Section 121 Excludes and What It Doesn't
On this page

You sell your home for a $180,000 gain, exclude every dollar of it under the Section 121 home-sale exclusion — and still owe tax on the sale. The bill comes from a corner of the tax code most home-office filers never think about until closing day: the depreciation you deducted for your home office over the years cannot be excluded, no matter how far under the $250,000 or $500,000 limit you are. It gets taxed separately as unrecaptured Section 1250 gain, at rates up to 25%.

This is not an edge case. Anyone who claimed the regular (actual-expense) home office deduction while owning their home has a depreciation trail attached to the property, and the IRS requires you to settle up when you sell. Here is how the exclusion and the recapture interact, how the tax is actually computed, and the record-keeping that keeps the bill from becoming a surprise.

How the Section 121 Exclusion Works​

Section 121 lets you exclude up to $250,000 of gain from the sale of your main home — $500,000 for a married couple filing jointly — if you meet three tests:

  • Ownership test: you owned the home for at least 2 of the 5 years ending on the sale date.
  • Use test: you lived in it as your main home for at least 2 of those 5 years. The ownership and use periods do not have to overlap.
  • Look-back test: you did not exclude gain from another home sale in the 2 years before this one.

Meet all three and the mechanics are generous. A single filer with a $200,000 gain excludes all of it and generally does not even have to report the sale. A couple with a $450,000 gain excludes all of it too. Gain above the cap is taxed as long-term capital gain at the usual 0%, 15%, or 20% rates.

So far, so good. The trap is that the exclusion applies to gain — and one slice of your gain is carved out before the exclusion ever touches it.

The Carve-Out: Depreciation After May 6, 1997 Cannot Be Excluded​

The rule, stated plainly in IRS Publication 523: if you were entitled to take depreciation deductions because you used your home for business or as rental property, you cannot exclude the part of your gain equal to any depreciation allowed or allowable for periods after May 6, 1997.

Two phrases in that sentence do heavy lifting:

  • "Allowed or allowable" means what you actually deducted or what you could have deducted. Choosing not to claim depreciation on your home office does not spare you — the IRS treats the depreciation you were entitled to as if you took it, reducing your basis and creating taxable gain at sale. This is the single most misunderstood part of the rule.
  • "After May 6, 1997" is the enactment date of the current exclusion. In practice, virtually every home-office depreciation deduction claimed by a living taxpayer falls after this line.

That carved-out slice is called unrecaptured Section 1250 gain, and it follows its own tax path.

Unrecaptured Section 1250 Gain and the 25% Maximum Rate​

When you depreciate residential real estate, you use the straight-line method over 27.5 years, which means there is no "excess over straight-line" depreciation for the IRS to recapture as ordinary income the way it does for equipment. Instead, the straight-line depreciation you took on real property held more than a year becomes unrecaptured Section 1250 gain when you sell.

Here is what that means for your tax bill:

  • The unrecaptured portion is taxed at your ordinary income tax rates, capped at a maximum of 25%. If your marginal rate is 22%, you pay 22% on this slice; if it is 32% or higher, you pay 25%.
  • The rest of your gain — the part attributable to appreciation — is taxed at the preferential 0%/15%/20% long-term capital gains rates, or excluded under Section 121.
  • The computation happens on the Unrecaptured Section 1250 Gain Worksheet in the Schedule D instructions, which stacks the 25%-rate gain above your other capital gains so each slice gets its correct rate.

A concrete example makes the stacking clear. Suppose you bought a home for $300,000, claimed $12,000 of home-office depreciation over the years (reducing your adjusted basis to $288,000), and sell for $480,000. Your total gain is $192,000. As a single filer you exclude gain up to $250,000 — but the $12,000 depreciation slice is carved out first. You exclude $180,000 and pay tax on $12,000 of unrecaptured Section 1250 gain at up to 25%, or up to $3,000. The exclusion did its job on the appreciation; it simply never covered the depreciation.

Office Inside Your Living Area vs. a Separate Structure​

Publication 523 draws a sharp line based on where the business space sits, and the two cases are taxed very differently.

Space within the living area: no allocation, just the recapture​

If your office is a room inside your home — a spare bedroom, a converted den, attic space used as an office — you do not allocate the sale between a business portion and a residence portion, and you do not report the business part on Form 4797. The entire gain qualifies for the Section 121 exclusion except the depreciation slice, which you report as unrecaptured Section 1250 gain.

The IRS illustrates this with an attorney who uses part of a single dwelling unit as a law office, claims $2,000 of depreciation, and sells at a $13,000 gain: $2,000 is recognized as unrecaptured Section 1250 gain and the remaining $11,000 is excluded. Scale those numbers up to a decade of home-office deductions and a hot housing market, and you have the typical case.

Space separate from the living area: allocation required​

A detached studio, a converted garage with its own entrance used exclusively for business, a duplex unit you rented out, or a store with an upstairs apartment are "separate from the dwelling unit." For these, the exclusion generally does not cover the business portion at all. You must:

  1. Allocate basis and sale price between the residence and business portions, using the same allocation method you used for depreciation.
  2. Complete separate gain calculations for each portion (Publication 523's Worksheet 2, three copies: Total, Home, Business or Rental).
  3. Report the business portion on Form 4797, where the depreciation becomes unrecaptured Section 1250 gain and any remaining business-portion gain is Section 1231 gain.

The narrow exception: a separate portion you both owned and lived in for at least 2 of the last 5 years can still qualify for the exclusion. And space formerly used for business that you converted back to residence use for 2 or more of the last 5 years qualifies too — but the old depreciation still comes back as unrecaptured Section 1250 gain. The use can be cured; the depreciation cannot.

The Simplified Method: Smaller Deduction, Zero Recapture​

There is one clean way to have claimed a home office deduction for years and owe no recapture at all: the IRS simplified option. Instead of actual expenses, you deduct $5 per square foot of office space, up to 300 square feet, for a maximum of $1,500 per year.

The simplified method includes no depreciation component, so there is nothing to recapture when you sell. The IRS confirms this explicitly: for years you used the simplified method, no depreciation adjustment is needed. Only years under the regular (actual-expense) method on Form 8829 create a recapture trail — and if you switched methods over the years, you recapture only the regular-method years.

This reframes the annual method choice. The regular method usually produces a bigger yearly deduction for homeowners with real mortgage interest, taxes, and utilities. But each regular-method year adds to a future tax bill at up to 25%, while simplified-method years add nothing. If you expect to sell within a few years with a large gain, running the numbers both ways — current deduction value versus future recapture cost — can change which method wins.

Records to Keep From the Day You Claim the Deduction​

Recapture is computed from history, so the sale-year tax return is only as accurate as the records behind it. Keep:

  • Every Form 8829 you filed, or at least a running total of depreciation claimed per year. Your tax software may not carry this forward usefully across providers.
  • The business-use percentage you used each year (office square footage divided by total home square footage), since it determines the depreciation allocable to the office.
  • Improvement receipts, which raise your basis and shrink total gain — every $1,000 of documented improvements is $1,000 less gain to exclude or tax.
  • A note of which years used the simplified method, so you (or your preparer) do not recapture depreciation that was never claimed or allowable.

If you cannot reconstruct the history, the conservative approach is to compute what was allowable — the IRS will assume you took it whether you did or not, so guessing low just manufactures an underpayment.

Common Mistakes That Inflate the Bill​

Assuming the exclusion covers everything. The $250,000/$500,000 limit applies after the depreciation carve-out, not before. Filers who net the whole gain to zero and never file Form 4797 or the Schedule D worksheet underreport the unrecaptured portion.

Skipping depreciation to dodge recapture. As noted, "allowable" depreciation counts even if never claimed. Deliberately omitting it sacrifices a deduction at your full marginal rate today to avoid a capped 25% rate later — the worst of both worlds.

Forgetting rental years. If the whole home was a rental for part of your ownership — say you moved out and rented it for two years before selling — the depreciation from those years is recaptured the same way, and post-2008 nonqualified-use rules may also shrink the excludable portion of the gain itself. The home-office analysis and the rental analysis stack.

Missing the "allowable" catch-up. If you used the regular method but your preparer never computed depreciation, you still owe recapture on what should have been taken, and you generally cannot go back and claim the missed deductions without filing for a change in accounting method. Fix it while you still own the home, not at closing.

How the Sale Gets Reported​

For the common case — office within the living area, gain otherwise fully excludable — the reporting is modest but specific:

  1. Figure total gain on Worksheet 2 of Publication 523, subtracting depreciation from basis first.
  2. Carve out the depreciation amount as unrecaptured Section 1250 gain, reported via Form 4797 and flowing to the Schedule D Tax Worksheet.
  3. Exclude the remaining gain on Worksheet 3, up to your $250,000 or $500,000 limit.

Even when the entire appreciation is excluded, the unrecaptured portion means you have a filing obligation for the sale — the "no need to report" shortcut for fully excluded sales does not apply once recapture exists.

Keep Your Property Records Organized From Day One​

The home-sale tax surprise in this article is, at bottom, a record-keeping failure compounded over years: depreciation totals scattered across old returns, improvement receipts in a shoebox, no running basis ledger. Maintaining clear financial records as you go — every improvement logged, every depreciation schedule filed where you can find it — turns a stressful closing-season reconstruction into a ten-minute lookup. Beancount.io provides plain-text accounting that gives you complete transparency and control over your financial data, including a version-controlled ledger where basis adjustments and depreciation live alongside everything else. Get started for free and see why developers and finance professionals are switching to plain-text accounting.

Source: https://beancount.io/blog/2026/10/12/selling-home-after-home-office-depreciation-section-121-unrecaptured-1250-guide

Published: October 12, 2026