skip navigation

Search Help
Navigation Help

Topic Index
ABCDEFGHI
JKLMNOPQR
STUVWXYZ#

Affordable Care Act
Tax Topic Index

International
Tax Topic Index

FAQs
Forms
Publications
Tax Topics

Comments
About Tax Map

IRS.gov Website
Publication 523
taxmap/pubs/p523-004.htm#en_us_publink1000200763

Business Use or Rental of Home(p15)

rule
You may be able to exclude gain from the sale of a home you have used for business or to produce rental income if you meet the ownership and use tests.
taxmap/pubs/p523-004.htm#en_us_publink1000200764

Example 1.(p15)

On May 26, 2006, Amy, who is unmarried for all years in this example, bought a house. She moved in on that date and lived in it until May 31, 2008, when she moved out of the house and put it up for rent. The house was rented from June 1, 2008, to March 31, 2010. Amy claimed depreciation deductions in 2008 through 2010 totaling $10,000. Amy moved back into the house on April 1, 2010, and lived there until she sold it on January 31, 2012, for a gain of $200,000. During the 5-year period ending on the date of the sale (January 31, 2007–January 31, 2012), Amy owned and lived in the house for more than 2 years as shown in the following table.
Five-Year PeriodUsed as HomeUsed as Rental
1/31/07 – 5/31/0816 months 
6/01/08 – 3/31/10 22 months
4/01/10 – 1/31/1222 months
 38 months22 months
   
During the period Amy owned the house (2,076 days), her period of nonqualified use was 455 days. Because the gain attributable to periods of nonqualified use is $41,610, Amy can exclude $148,390 of her gain, as shown on Worksheet 2.
taxmap/pubs/p523-004.htm#en_us_publink1000200767

Example 2.(p15)

William owned and used a house as his main home from 2006 through 2009. On January 1, 2010, he moved to another state. He rented his house from that date until April 30, 2012, when he sold it. During the 5-year period ending on the date of sale (May 1, 2007–April 30, 2012), William owned and lived in the house for more than 2 years. Because it was rental property at the time of the sale, he must report the sale on Form 4797. Because the period of nonqualified use does not include any part of the 5-year period after the last date William lived in the house, he has no period of nonqualified use. Because he met the ownership and use tests, he can exclude gain up to $250,000. However, he cannot exclude the part of the gain equal to the depreciation he claimed or could have claimed for renting the house, as explained next.
taxmap/pubs/p523-004.htm#en_us_publink1000200768

Depreciation after May 6, 1997.(p16)

rule
If you were entitled to take depreciation deductions because you used your home for business purposes or as rental property, you cannot exclude the part of your gain equal to any depreciation allowed or allowable as a deduction for periods after May 6, 1997. If you can show by adequate records or other evidence that the depreciation allowed was less than the amount allowable, then you may limit the amount of gain recognized to the depreciation allowed.
taxmap/pubs/p523-004.htm#en_us_publink1000200769
Unrecaptured section 1250 gain.(p16)
This is the part of any long-term capital gain from the sale of your home that is due to depreciation and cannot be excluded. To figure the amount of unrecaptured section 1250 gain to be reported on Schedule D (Form 1040), you must also take into account certain gains or losses from the sale of property other than your home. Use the Unrecaptured Section 1250 Gain Worksheet in the Schedule D instructions for this purpose.
taxmap/pubs/p523-004.htm#en_us_publink1000266455
Pencil

Worksheet 2. Taxable Gain on Sale of Home

Part 1. Gain or (Loss) on Sale   
1. Selling price of home1. 
2. Selling expenses (including commissions, advertising and legal fees, and seller-paid loan charges)2. 
3. Subtract line 2 from line 1. This is the amount realized3. 
4. Adjusted basis of home sold (from Worksheet 1, line 13)4. 
5. Gain or (loss) on the sale. Subtract line 4 from line 3. If this is a loss, stop here 5.200,000 
Part 2. Exclusion and Taxable Gain   
6. Enter any depreciation allowed or allowable on the property for periods after May 6, 1997. If none, enter -0-6.10,000 
7. Subtract line 6 from line 5. If the result is less than zero, enter -0-7.190,000 
8. Aggregate number of days of nonqualified use after 12/31/20088.455 
9. Number of days taxpayer owned the property9.2,076 
10. Divide the amount on line 8 by the amount on line 9. Enter the result as a decimal (rounded to at least 3 places). But do not enter an amount greater than 1.00 10.0.219 
11. Gain allocated to nonqualified use. (Line 7 multiplied by line 10)11.41,610 
12. Gain eligible for exclusion. Subtract line 11 from line 7.12.148,390 
13. If you qualify to exclude gain on the sale, enter your maximum exclusion (see Maximum Exclusion).
If you qualify for a reduced maximum exclusion, enter the amount from Worksheet 3, line 7. If you do
not qualify to exclude gain, enter -0-
13.250,000 
14. Exclusion. Enter the smaller of line 12 or line 13 14.148,390 
15.  Taxable gain. Subtract line 14 from line 5. Report your taxable gain as described under Reporting the Sale. If the amount on line 6 is more than zero, complete line 1615.51,610 
16.  Enter the smaller of line 6 or line 15. Enter this amount on line 12 of the Unrecaptured Section 1250 Gain
Worksheet in the instructions for Schedule D (Form 1040)
16.10,000
taxmap/pubs/p523-004.htm#en_us_publink1000200771

Property Used Partly for
Business or Rental(p16)

rule
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.
taxmap/pubs/p523-004.htm#en_us_publink1000200772

Part of Home Used for Business or Rental(p16)

rule
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 cannot exclude the part of any gain equal to any depreciation allowed or allowable after May 6, 1997. See Depreciation after May 6, 1997, earlier.
taxmap/pubs/p523-004.htm#en_us_publink1000200774

Example 1.(p16)

Ray sold his main home in 2012 at a $30,000 gain. He has no gains or losses from the sale of property other than the gain from the sale of his home. He meets the ownership and use tests to exclude the gain from his income. However, he used part of the home as a business office in 2011 and claimed $500 depreciation. Because the business office was part of his home (not separate from it), he does not have to allocate the gain on the sale between the business part of the property and the part used as a home. In addition, he does not have to report any part of the gain on Form 4797. Because Ray was entitled to take a depreciation deduction, he must recognize $500 of the gain as unrecaptured section 1250 gain. He reports his gain, exclusion, and the taxable gain of $500 on Form 8949 and Schedule D (Form 1040).
taxmap/pubs/p523-004.htm#en_us_publink1000200775

Example 2.(p17)

The facts are the same as in Example 1 except that Ray was not entitled to claim depreciation for the business use of his home. Since Ray did not claim any depreciation, he can exclude the entire $30,000 gain.
taxmap/pubs/p523-004.htm#en_us_publink1000200776

Separate Part of Property Used
for Business or Rental(p17)

rule
You may have used part of your property as your home and a separate part of it for business or to produce rental income. Examples are:
taxmap/pubs/p523-004.htm#en_us_publink1000200777

Use test not met for business part.(p17)

rule
You cannot 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 do not meet the use test for the 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 upon its sale between the business or rental part and the part used as a home. See Example 5, later, for an example of how to do this. You must report the sale of the business or rental part on Form 4797.
taxmap/pubs/p523-004.htm#en_us_publink1000200779

Example 3.(p17)

In 2008, Lew bought property that consisted of a house, a stable, and 35 acres. He used the house and 7 acres as his main home and used the stable and 28 acres in his business for the next 4 years. He sold the entire property in 2012 at a $10,000 gain. Lew met the ownership and use tests for the house but did not meet the use test for the stable. Since the business part was separate from his home, Lew must allocate the basis of the property and the amount realized between the part of the property he used for his home and the part he used for his business. Lew reports the gain on the business part of his property on Form 4797. He can exclude the gain on the part of the property that was his main home.
taxmap/pubs/p523-004.htm#en_us_publink1000200780

Example 4.(p17)

In 2007, Mary bought property that consisted of a house, a barn, and 2 acres. Mary used the house and 2 acres as her main home and used the barn in her antiques business. In 2011, Mary moved out of the house and rented it to tenants. She claimed depreciation on the house while renting it in 2011 and 2012. She continued to use the barn in her business. Mary sold the entire property in 2012 for a $21,000 gain. Since the barn is separate from her home, Mary must allocate the basis of the property and amount realized between the residential and business parts of the property. She reports the entire gain from the barn on Form 4797 since she did not meet the use test for the barn. She must also report gain on the home to the extent of the depreciation she claimed for the rental.
taxmap/pubs/p523-004.htm#en_us_publink1000200781

Use test met for business part (with business use in year of sale).(p17)

rule
If you used a separate part of your property for business or to produce rental income in the year of sale, you should treat the sale of the property as the sale of two properties, even if you met the use test for the business or rental part. You must report the sale of the business or rental part on Form 4797.
To determine the amounts to report on Form 4797, you must divide your selling price, selling expenses, and basis between the part of the property used for business or rental and the separate part used as your home. In the same way, if you qualify to exclude any of the gain on the business or rental part of your property, also divide your maximum exclusion between that part of the property and the separate part used as your home. If you use Worksheet 2 (near the end of this publication) to figure your exclusion and taxable gain from each part, fill out a separate Part 2 of the worksheet for each.
taxmap/pubs/p523-004.htm#en_us_publink1000200782
Excluding gain on the business or rental part of your property.(p17)
In most cases, you can exclude gain on the part of your property used for business or rental if you owned and lived in that part as your main home for at least 2 years during the 5-year period ending on the date of the sale. If you used a separate Worksheet 2, Part 2, to figure the exclusion for the business or rental part, fill it out only through line 14. Then fill out Form 4797. Enter the exclusion for the business or rental part on Form 4797 as explained in the Form 4797 instructions. (Also see Example 5, later.)
If you have any taxable gain due to depreciation, first fill out the Unrecaptured Section 1250 Gain Worksheet in the Schedule D (Form 1040) instructions. Enter the result on Schedule D. To figure your tax, complete the Schedule D Tax Worksheet in the Schedule D instructions (do not use the Qualified Dividends and Capital Gain Tax Worksheet in the Form 1040 instructions).
taxmap/pubs/p523-004.htm#en_us_publink1000200784

Example 5.(p17)

In January 2008, you bought and moved into a 4-story townhouse. In December 2010, you converted the basement level, which has a separate entrance, into a separate apartment by installing a kitchen and bathroom and removing the interior stairway that led from the basement to the upper floors. After you completed the conversion, your townhouse had a rental unit that was separate from the part of your house used as your home. You lived in the first, second, and third levels of the townhouse and rented the basement level to tenants until December 2012. You claimed the allowable depreciation of $2,000 for the basement apartment. You sold the entire townhouse in December 2012 for a $16,000 gain. Your records show the following.
Purchase price$ 96,000
Improvements (kitchen and bath in rental)4,000
Depreciation (on rental) 2,000
Selling price 124,000
Selling expenses 10,000
Because you met the ownership and use tests for both the rental apartment and your residence, you can claim an exclusion for both parts. However, because they are separate units, you must allocate your basis, selling price, and selling expenses between them. You start by finding the adjusted basis of each part. You determine that three-fourths (75%) of your purchase price was for the part used as your home and one-fourth (25%) was for the rental part.
 HomeRental
 (3/4)(1/4)
Purchase price$72,000$24,000
Plus: Improvements-0-4,000
Minus: Depreciation -0-2,000
Adjusted basis$72,000$26,000
Next, to figure the gain on each part, fill out a separate Part 1 of Worksheet 2 for each part, dividing your selling price and selling expenses between the home and the rental.
Worksheet 2. Gain or (Loss), Exclusion, and Taxable Gain on Sale of Home
  HomeRental
  (3/4)(1/4)
Part 1. Gain or (Loss) on Sale  
1.Selling price of home$93,000$31,000
2.Selling expenses7,500 2,500
3.Subtract line 2 from line 1. This is the amount realized$85,500$28,500
4.Adjusted basis of home sold72,00026,000
5.Subtract line 4 from line 3. This is the gain or (loss)$13,500$ 2,500
Then, to figure your taxable gain and exclusion, fill out a separate Part 2 of Worksheet 2 for each part, dividing your maximum exclusion between the two parts. You are single, so the maximum exclusion is $250,000.
  HomeRental
  (3/4)(1/4)
Part 2. Exclusion and Taxable Gain  
6.Depreciation allowed or allowable after May 6, 1997$-0-$2,000
7.Subtract line 6 from line 513,500 500
8.Aggregate number of days of nonqualified use after 12/31/2008-0--0-
9.Number of days taxpayer owned the propertyN/AN/A
10.Divide the amount on line 8 by the amount on line 9. Enter the result as a decimal (rounded to at least 3 places). But do not enter an amount greater than 1.00 -0--0-
11.Gain allocated to nonqualified use (line 7 multiplied by line 10)-0--0-
12.Gain eligible for exclusion. Subtract line 11 from line 713,500500
13.Maximum exclusion$187,500$62,500
14.Exclusion (smaller of line 12 or
line 13)
13,500500
15.Taxable gain (line 5 minus line 14)-0- *
16.Smaller of line 6 or line 15-0- *
* Lines 15 and 16 do not need to be filled out for the rental part.
Report the gain from the rental part, $2,500, in Part III of Form 4797. Enter your $500 exclusion as a loss (in parentheses) on Form 4797, line 2, column (g), and enter "Section 121 exclusion" on that line. Your taxable gain from the rental part is $2,000 ($2,500 – $500).
taxmap/pubs/p523-004.htm#en_us_publink1000200790

Use test met for business part (with no business use in year of sale).(p18)

rule
If you have used a separate part of your property for business or to produce rental income (though not in the year of sale) but meet the use test for both the business or rental part and the part you use as a home, you do not need to treat the transaction as the sale of two properties. Also, you do not need to file Form 4797. In most cases, you can exclude gain on the entire property.
taxmap/pubs/p523-004.htm#en_us_publink1000200791

Example 6.(p18)

Assume the same facts as in Example 5, except that in March 2012, you combined the two separate dwelling units by eliminating the basement kitchen and building a new interior stairway to the upper floors. You then used the entire townhouse as your main home for the rest of 2012. Because the entire townhouse was used as your main home for at least 2 years during the 5-year period ending on the date of the sale, you report the gain, $16,000, and the allowable exclusion ($14,000), in Part II Form 8949, and in Part II of Schedule D (Form 1040). Since your $2,000 taxable gain is from depreciation, it is unrecaptured section 1250 gain; enter it on line 12 of the Unrecaptured Section 1250 Gain Worksheet in the Schedule D (Form 1040) instructions. You have no gains or losses from the sale of property other than the gain from the sale of your home, so you also enter $2,000 on lines 13 and 18 of the worksheet and on line 19 of Schedule D. Then figure your tax using the Schedule D Tax Worksheet.