Property Used Partly for Business or Rental: Home Sale Taxes (2025 IRS Guide)
This guide covers “Property Used Partly for Business or Rental” within home sale taxes. The following material presents the IRS treatment of this topic, including the qualifications, exceptions, and examples in the source section. Read the rules alongside the facts of your own situation before deciding what to report, deduct, or document.
Adapted from Publication 523 (2025), Selling Your Home, published by the Internal Revenue Service. This guide retains the source edition’s years, amounts, deadlines, and examples. It is guidance for that edition, not a statement that the same figures apply to every tax year.
Context for these rules
To figure the gain or loss on the sale of your main home, you must know the selling price, the amount realized, and the adjusted basis. Subtract the adjusted basis from the amount realized to get your gain or loss.
A positive number indicates a gain; a negative number indicates a loss.
Certain events during your ownership, such as use of your home for business purposes or your making improvements to it, can affect your gain or loss. They are explained in this section.
See Worksheet 2, later, for steps you should follow to figure your gain or loss.
Property Used Partly for Business or Rental
Calculation.
If you use property partly as a home and partly for business or to produce rental income, the treatment of any gain on the sale depends partly on whether the business or rental part of the property is part of your home or separate from it. If you fail to meet the ownership and use tests, or if you used a separate portion of your home for business or rental purposes during your ownership, this may affect your gain or loss calculations. If a portion of the property was used for residential purposes and another portion of the property, separate from the dwelling unit, was used for nonresidential purposes, then only the gain allocable to the residential portion is excludable under Section 121. The Section 121 exclusion is reduced to the extent of any depreciation adjustments in connection with the rental or business use of your residence. For details and an example, see Recapturing Depreciation, later. Treatment of any gain also depends on the use during the 5 years leading up to the sale. To figure the portion of the gain allocated to the period of nonresidential use, see Business or rental usage calculations, later. See also Worksheet 2.
Space within the living area.
If the part of your property used for business or to produce rental income is within your home, such as a room used as a home office for a business, you do not need to allocate gain on the sale of the property between the business part of the property and the part used as a home. In addition, you do not need to report the sale of the business or rental part on Form 4797. This is true whether or not you were entitled to claim any depreciation. However, you can’t exclude the portion of gain equal to any section 1250(b)(3) depreciation adjustments allowed or allowable after May 6, 1997, which must be recaptured and reported under section 1250. See Regulations section 1.121-1(d). See also Recapturing Depreciation, later. Other examples of space within the living area include a rented spare bedroom and attic space used as a home office.
Example of nonresidential use within a dwelling unit.
Logan, an attorney, buys a house in 2013. The house is a single dwelling unit but Logan uses a portion of the house exclusively as a law office on a regular basis. Logan claimed depreciation deductions of $2,000 during the period that the house is owned. Logan sells the house in 2016, realizing a gain of $13,000. Logan has no other section 1231 or capital gains or losses for 2016. Logan must recognize $2,000 of the gain as unrecaptured section 1250 gain. Logan completes Form 4797 to report the amount of depreciation recapture, if any. Logan may exclude the remaining $11,000 of the gain from the sale of the house because Logan is not required to allocate gain to the business use within the dwelling unit. See Regulations section 1.121-1(e). See also Determine any depreciation amounts you may need to recapture for guidance on reporting depreciation previously deducted.
Space separate from the living area.
You generally can’t exclude gain on the separate portion of your property used for business or to produce rental income. Regulations section 1.121-1(e) provides that the use of a separate portion of your home for business or rental purposes doesn’t qualify for exclusion under section 121, and this may affect your gain or loss calculations. See Regulations section 1.121-1(e). Examples are:
-
A working farm on which your house was located,
-
A duplex in which you lived in one unit and rented the other, or
-
A store building with an upstairs apartment in which you lived.
You can’t exclude gain on the separate part of your property used for business or to produce rental income unless you owned and lived in that part of your property for at least 2 years during the 5-year period ending on the date of the sale. If you don’t meet the use test for the separate business or rental part of the property, an allocation of the gain on the sale is required. For this purpose, you must allocate the basis of the property and the amount realized between the residential and nonresidential portions of the property using the same method of allocation that you used to determine depreciation adjustments. See the Example for allocating residential and nonresidential portions of the property. Report the sale of the business or rental part on Form 4797. For more information about using any part of your home for business or as a rental property, see Pub. 587, Business Use of Your Home, and Pub. 527, Residential Rental Property.
Space formerly used as business or rental.
Note that space formerly used as business or rental will qualify for exclusion under section 121 if the space was converted to the taxpayer’s principal residence for a total of 2 years or more, as long as the use as the principal residence was within the 5 years leading up to the sale. See Regulations section 1.121-1(a). However, depreciation deductions claimed during the previous business use must be reported on line 5a of Worksheet 2 and recognized as unrecaptured section 1250 gain. No separate Business worksheet is needed because there are no current business expenses. See Regulations section 1.121-1(d). See also the Instructions for Form 4797, and the Instructions for Schedule D (Form 1040). For information on unrecaptured section 1250 gain, see Recapturing Depreciation, later.
Business or rental usage calculations.
If you use property partly as a home and partly for business or to produce rental income and the business or rental portion isn’t within the home’s living area, you need to make separate gain/loss calculations for the business and residence portions of your property. Make three copies of all pages of Worksheet 2. Label one copy “Total,” one copy “Home,” and one copy “Business or Rental.”
Complete your “Total” worksheet using the figures for your property as a whole. Include the total amount you received, all of your basis adjustments, etc. Include the cost of all improvements, whether you made them to the business space or the residential space.
Determine your “business or rental percentage,” meaning the percentage of your property that you used for business or rental. Section 121 requires you to recognize depreciation claimed on a home after May 6, 1997. If you were entitled to take depreciation deductions because you used a portion of your home for business purposes or as rental property, you can’t exclude the part of your gain equal to any depreciation allowed or allowable as a deduction for periods after May 6, 1997.
If you used part of your home for business or rental after May 6, 1997, you may need to pay back (“recapture”) some or all of the depreciation deductions you were entitled to take on your property. “Recapturing” depreciation means you must include it as ordinary income on your tax return. See Regulations section 1.1250-1 for limitations. If you took depreciation on your home on past tax returns, use the same business or rental percentage that you used in determining how much depreciation to take. If you didn’t take depreciation on your home on past tax returns, compare the size of your business or rental space to the size of the whole property and express this as a percentage. For example, if you have a building with three equal-sized stories, and you live in the top two stories and use the ground floor for a store, then you are using one-third of the property and your business percentage is 33.3%.
For each number on your “Total” worksheet, figure the business-related portion of that number and enter it on your “Business or Rental” worksheet. You may use different methods to determine the business portion of different numbers. Here are the three possible methods and the circumstances under which each method applies.
-
Dollar-amount method. Where a figure consists of specific dollar amounts that relate to either the residence portion or the business portion of the property, the figure must be broken down by these dollar amounts. For example, if the figure for improvements to the property was $100,000 and all of that applied to the residence portion, then the business portion of the improvements would be zero.
-
“100% rule” for depreciation. The first item under line 5a in Worksheet 2 is a business depreciation item. Any figure for this item is 100% a business figure.
-
Percentage method. Where a figure applies to the property as a whole (such as the sale price), the business or rental portion is the figure multiplied by the business portion percentage you calculated earlier. Use the percentage method for all items that don’t require the dollar-amount or depreciation methods.
The total you get on line 7 on your “Business” copy of Worksheet 2 is the gain or loss related to the business or rental portion of the property you sold.
Next, complete your “Home” worksheet. For each number, take the number from your “Total” worksheet, subtract the number from your “Business or Rental” worksheet, and enter the result in your “Home” worksheet (for example, subtract the number on line 1f of the "Business or Rental" worksheet from the number on line 1f of your "Total" worksheet), and enter the result on your "Home" worksheet.
Now figure the totals on your “Home” worksheet. The total you get on line 7 on the “Home” copy of Worksheet 2 is the gain or loss related to the home portion of the property you sold.
Review the results of your “Home” and “Business” worksheets to determine your next step. When you have completed each worksheet, you will know whether you have a gain or loss on each part of your property. It is possible to have a gain on both parts, a loss on both parts, or a gain on one part and a loss on the other. For more information about using any part of your home for business or as a rental property, see Pub. 587, Business Use of Your Home, and Pub. 527, Residential Rental Property.
Example.
The following example demonstrates separate calculations for business and residential uses.
Stacey owns property that consists of a house, a stable, and 35 acres. Stacey uses the stable and 28 acres for nonresidential purposes for more than 3 years during the 5-year period preceding the sale. Stacey uses the entire house and the remaining 7 acres as a principal residence for at least 2 years during the 5-year period preceding the sale. For periods after May 6, 1997, Stacey claims depreciation deductions of $9,000 for the nonresidential use of the stable. Stacey sells the entire property in 2014, realizing a gain of $24,000. Stacey has no other section 1231 or capital gains or losses for 2014.
Because the stable and the 28 acres used in the business are separate from the dwelling unit, the allocation rules apply. Stacey must allocate the basis and amount realized between the portion of the property used as a principal residence and the portion used for nonresidential purposes based on their respective FMVs. Stacey creates three copies of Worksheet 2 and titles them “Business or Rental,”“Home,” and “Total” to allocate basis and the amount realized for the different uses of the property.
Stacey determines that $14,000 of the gain is allocable to the nonresidential-use portion of the property by completing the copy of Worksheet 2 entitled “Business or Rental.” Stacey determines that $10,000 of the gain is allocable to the portion of the property used as a residence by completing the copy of Worksheet 2 entitled “Home.” Stacey must recognize the $14,000 of gain allocable to the nonresidential-use portion of the property ($9,000 of which is unrecaptured section 1250 gain, and $5,000 of which is adjusted net capital gain). Stacey reports gain associated with the nonresidential-use portion of the property on Form 4797. Stacey may have to complete Form 8949 and Schedule D (Form 1040). See Sale of Home Used for Business, in the Instructions for Form 4797. See also the Instructions for Form 8949, and the Instructions for Schedule D (Form 1040). For information on the treatment of unrecaptured section 1250 gain, see Recapturing Depreciation, later.
Stacey transfers the gain from the “Home” worksheet to Worksheet 3, reviews the maximum amount available for exclusion as figured on Worksheet 1, and determines that the $10,000 gain from the residence portion is less than the maximum amount available for exclusion from Worksheet 1. The $10,000 gain on the property may be excluded.
Complete Worksheet 2. Then see Table 2 to determine your next steps. Worksheet 2 is used to figure the adjusted basis of your home and your gain or (loss). You will figure your taxable gain (if any) on Worksheet 3, later.
Worksheet 2. How To Figure Your Gain or Loss
DO NOT use this worksheet to determine your basis if you acquired an interest in your home from a decedent who died in 2010 and whose executor filed Form 8939. See Home acquired from a decedent who died before or after 2010.
If you have questions as you work through these step-by-step instructions or want examples of costs that can and can’t be included, see Basis Adjustments—Details and Exceptions .
| ||||
| 1. | Determine the sale price. This is everything you received for selling your home. | |||
| a. | All money (currency, check, wire transfer) | a. | _____ | |
| b. | The fair market value of any other property or services you received, including digital assets | b. | _____ | |
| c. | The value of any notes, mortgages, or other debts that the buyer agreed to assume (take over) as part of the sale | c. | _____ | |
| d. | Any real estate taxes the buyer paid on your behalf | d. | _____ | |
| e. | Any amount you received for granting an option to buy your home, if the option was exercised | e. | _____ | |
| f. | Add lines 1a through 1e. This is your sale price | f. | _____ | |
| ||||
| 2. | Determine your selling expenses. These are the costs directly associated with selling your home. | |||
| a. | Any sales commissions (for example, a real estate agent’s sales commission) | a. | _____ | |
| b. | Any advertising fees | b. | _____ | |
| c. | Any legal fees | c. | _____ | |
| d. | Any mortgage points or other loan charges you paid that would normally have been the buyer’s responsibility | d. | _____ | |
| e. | Any other fees or costs to sell your home | e. | _____ | |
| f. | Add lines 2a through 2e. These are your selling expenses | f. | _____ | |
| 3. | Figure your “amount realized” (sale price minus selling expenses). | |||
| Line 1f minus line 2f | 3. | _____ | ||
| 4. | Determine your “total basis” (the total amount you invested in your home). This includes what you paid for your home as well as other money you may have spent that added to its value. | |||
| a. | The amount you paid for your home (or if you built your home, the cost of the land). Include any down payment and any amount you borrowed to pay for the home. For cooperative apartments, include the value of the corporation stock you purchased. If you acquired your home through inheritance, gift, bargain sale, trade, or anything except a fair market purchase, see Basis Adjustments—Details and Exceptions | a. | _____ | |
| b. | Any settlement fees or closing costs you paid when you bought your home, except for financing-related costs (such as seller-paid points). The settlement statement should list the fees related to buying the home. See Basis Adjustments—Details and Exceptions and Fees and Closing Costs | b. | _____ | |
| c. | Any real estate taxes or other costs you paid on behalf of the seller you bought your home from (and for which the seller never paid you back) | c. | _____ | |
| d. | Any amounts you spent on construction or other improvements that are still part of your home at the time of sale (not including costs of maintenance and repairs). See Basis Adjustments—Details and Exceptions | d. | _____ | |
| e. | Any amounts you spent to repair damage to your home or the land on which it sits | e. | _____ | |
| f. | Any special assessments for local improvements (such as special tax or condominium association assessments that aren’t merely for repairs or maintenance) | f. | _____ | |
| g. | Add lines 4a through 4f. This is your total basis | g. | _____ | |
Worksheet 2. How To Figure Your Gain or Loss (continued)
| 5. | Determine your “basis adjustments” (any payments, credits, or benefits you may need to deduct from your basis). | |||
| a. | Any depreciation you took or were allowed to take for the use of your home for business or rental purposes | a. | _____ | |
| b. | Any casualty losses (such as flood or fire damage) you claimed as a deduction on a federal tax return | b. | _____ | |
| c. | Any insurance payments you received or expect to receive for casualty losses | c. | _____ | |
| d. | Any payments you received for granting an easement, conservation restriction, or right-of-way | d. | _____ | |
| e. | Any energy credits or subsidies that effectively paid you back for improvements you included in your total basis, including home energy audits by a certified home energy auditor. See Basis Adjustments—Details and Exceptions | e. | _____ | |
| f. | Any adoption credits you claimed or any nontaxable payments from an employer-sponsored adoption assistance program | f. | _____ | |
| g. | Any real estate taxes the seller paid on your behalf (and for which you never paid the seller back). If you reimburse the seller, it doesn’t affect basis | g. | _____ | |
| h. | Any mortgage points the seller paid for you when you bought your home, if one of the following is true | h. | _____ | |
| ||||
| i. | Any canceled or forgiven mortgage debt amount on a qualified principal residence that was excluded before January 1, 2026 (or as part of an arrangement evidenced in writing before January 1, 2026) or due to a bankruptcy or insolvency and that you didn’t have to declare as income. (See Pub. 4681.) | i. | _____ | |
| j. | Any sales tax you paid on your home (such as for a mobile home or houseboat) and then claimed as a deduction on a federal tax return | j. | _____ | |
| k. | The value of any temporary housing the builder of your home provided for you | k. | _____ | |
| ||||
| l. | Any gain you postponed from the sale of a previous home sold before May 7, 1997 | l. | _____ | |
| m. | Add lines 5a through 5l. This is your basis adjustment | m. | _____ | |
| 6. | Figure your “adjusted basis” (total basis minus basis adjustments). | |||
| Line 4g minus line 5m | 6. | _____ | ||
| ||||
| 7. | Figure your gain or loss (amount realized minus adjusted basis). | |||
| Line 3 minus line 6 | 7. | _____ | ||
If this is your separate worksheet for business use, don’t follow guidance on line 7. Report the gain on Form 4797 because this gain is not excluded under section 121. | ||||
Table 2. Does Your Home or Business Show a Gain or a Loss?
| IF... | THEN... |
| your “Home” worksheet shows a loss, | follow the instructions at the end of line 7, under Worksheet 2 for “If the number is negative.” |
| your “Home” worksheet shows a gain, | see How Much Is Taxable? and Worksheet 3 to find out how much of the gain on your “Home” worksheet is taxable. |
| your “Business” worksheet shows a loss, | DON’T follow the instructions at the end of line 7, under Worksheet 2. Instead, report the loss from your “Business” worksheet on Form 4797, Sales of Business Property. Note: Your loss may be limited. See the Instructions for Form 4797. |
| your “Business” worksheet shows a gain, | you can’t exclude any of the gain shown on your “Business” worksheet. DON’T follow the instructions at the end of line 7, under Worksheet 2. Instead, report the gain from your “Business” worksheet on Form 4797. |
Using the guidance
Keep the documents that establish the dates, amounts, and circumstances described above. References to other chapters, forms, worksheets, or earlier and later sections refer to the linked IRS publication. Check the full publication and its updates before relying on a rule for a different tax year or a situation not addressed here.
Sources and further reading
- Publication 523 (2025), Selling Your Home: Figuring Gain or Loss — Property Used Partly for Business or Rental — Internal Revenue Service; 2025 edition.
The cited U.S. government text is in the public domain. Source accessed October 28, 2026. Fynoptic has organized this material for educational use and is independent of, and not endorsed by, the IRS.