U.S. · Home office and home sale

How does a home office affect selling your home?

A room inside the home usually does not split the sale, but depreciation comes back.

If the office is a room inside your home, you do not allocate the gain between business and personal parts and you do not report the business part on Form 4797. But you cannot exclude the part of the gain equal to depreciation allowed or allowable after May 6, 1997. The rest can qualify for the exclusion of up to $250,000 ($500,000 for certain married persons filing jointly) if you meet the ownership and use tests. A separate building used for business is treated differently. This page also answers whether home office depreciation affects a sale. It summarizes an IRS publication and is not tax advice.

IRS Publication 587 (2025), Sale or Exchange of Your Home: Gain on Sale; Depreciation; Basis AdjustmentRead November 2, 2026

Advertisement

Illustrate how depreciation limits the exclusion

Result

Advertisement

What the publication says

Publication 587 covers the sale of a home with a business part in its Sale or Exchange of Your Home section. The starting point is the exclusion: if you sell or exchange your home, you may be able to exclude up to $250,000 ($500,000 for certain married persons filing a joint return) of the gain. In most cases you must meet the ownership and use tests, which look at the 5-year period ending on the date of the sale: you owned the home for at least 2 years and lived in it as your main home for at least 2 years. The two years of residence do not need to be one block. The exclusion is not available if you acquired the property through a like-kind exchange during the past 5 years or if you are subject to the expatriate tax.

A room used as an office

If the part of your property used for business is within your home, such as a room used as a home office or rooms used to provide daycare, the publication says you do not need to allocate gain between the business part and the part used as a home, and you do not need to report the sale of the business part on Form 4797, Sales of Business Property. That is true whether or not you were entitled to claim depreciation. For most people with a spare-bedroom office, this is the good news: the sale reads as the sale of one home.

The qualification is in the next sentence. You cannot exclude the part of any gain equal to any depreciation allowed or allowable after May 6, 1997.

Why depreciation is the catch

Depreciation is the allowance for wear and tear on the business part of a home you own. The publication says that if you were entitled to deduct depreciation on that part, you reduce the gain by the depreciation you deducted, or could have deducted, for periods after May 6, 1997 when figuring how much you can exclude. If you can show by adequate records that the depreciation you actually deducted (allowed) was less than what you were entitled to deduct (allowable), the amount you cannot exclude is the amount you actually deducted. The practical lesson is that skipping depreciation on a return does not make the problem go away; the allowable amount can still count unless you can document the lower allowed figure.

Depreciation also lowers the basis. The publication says that if you used any part of your home for business you must adjust the basis for any depreciation that was allowable for the business use, even if you did not claim it. A lower basis raises the gain.

A worked example

This example is not from the publication. A single owner sells a home with a total gain of $300,000 after claiming $12,000 of depreciation on a home office since 2018. If the ownership and use tests are met, the $12,000 cannot be excluded. The remaining $288,000 is eligible, but the exclusion is capped at $250,000. So $250,000 is excluded and $50,000 remains as gain, including the $12,000 of depreciation. A couple filing jointly with the same figures can exclude the full $288,000, leaving the $12,000.

The calculator above reproduces this arithmetic. It assumes the ownership and use tests are met and that the gain is the total gain on the home; it does not compute the gain itself or the tax rate. The depreciation portion that is not excluded is a question for the Schedule D instructions and Publication 523, and the depreciation recapture calculator is a separate tool for general recapture rules. For the exclusion alone, see the home sale capital gain exclusion calculator.

A separate building is different

The publication draws a line between a business part within the home and a separate part of the property, such as an outbuilding. If the use test is not met for the business part, which means you did not own and live in that part for at least 2 years in the 5-year period, an allocation is required: you must allocate the basis and the amount realized between the business part and the home part, and report the sale of the business part on Form 4797. If you used the separate part for business in the year of sale, you treat it as the sale of two properties even if you met the use test, again reporting on Form 4797 and dividing the selling price, selling expenses, basis and your maximum exclusion. If the separate part was used for business, but not in the year of sale, and you meet the use test for both parts, you do not treat it as two properties and need not file Form 4797.

The publication adds that you do not reduce the gain by depreciation you deducted for a separate structure for which you cannot exclude the allocable portion of the gain.

Reporting and losses

You generally do not report the sale of your main home unless you received a Form 1099-S, you have a gain you cannot fully exclude, you choose not to exclude the gain, or you have a deductible loss. The publication cautions that a loss on the sale of your home, or the personal part of your home if it was also used for business or to produce rental income, is not deductible. If you used the home for business, you may need Form 4797 for the business part. The publication says it covers only the basic rules and points to Publication 523 for more.

Using the simplified method

If you used the simplified method for a year, depreciation for the home is deemed to be zero in that year. That year therefore adds nothing to the after-1997 depreciation that reduces the exclusion. Years in which you claimed actual expenses and depreciation do count. See the simplified vs regular home office deduction calculator for the tradeoff.

Sources

Edition read: Publication 587 (2025), for use in preparing 2025 returns. Dollar figures and rates in the publication are for 2025; check IRS.gov/Pub587 and the instructions for Schedule C and Form 8829 for your tax year. This page summarizes the publication and does not replace it. Marked for human review.

Advertisement

Frequently asked questions

Does a home office affect selling my home?

If the office is a room inside your home, you do not allocate the gain between business and personal parts or report the business part on Form 4797. Depreciation after May 6, 1997 cannot be excluded.

Does home office depreciation affect the sale?

Yes. You cannot exclude the part of the gain equal to depreciation allowed or allowable after May 6, 1997, and the basis is reduced by allowable depreciation.

What if I never claimed depreciation?

The basis adjustment and the exclusion reduction use the depreciation allowed or allowable. If you can document that less was allowed than allowable, the amount you cannot exclude is the amount actually deducted.

Is a detached garage office treated the same way?

No. A separate part of the property can require an allocation and Form 4797, depending on the use test and whether it was used for business in the year of sale.

How much gain can I exclude?

Up to $250,000, or $500,000 for certain married persons filing a joint return, if you meet the ownership and use tests.

Not tax advice

This page summarizes an IRS publication and is not tax, legal or financial advice. A CPA or an enrolled agent can confirm how a rule applies to your return. Everything runs in your browser; nothing you enter is sent anywhere.