You may be able to exclude gain from the sale of a home that you have used for business or to produce rental income. But you must meet the ownership and use tests.taxmap/pub17/p17-084.htm#en_us_publink1000172462
On May 29, 2003, Amy bought a house. She moved in on that date and lived in it until May 31, 2005, when she moved out of the house and put it up for rent. The house was rented from June 1, 2005, to March 31, 2007. Amy moved back into the house on April 1, 2007, and lived there until she sold it on January 30, 2009. During the 5-year period ending on the date of the sale (January 31, 2004–January 30, 2009), Amy owned and lived in the house for more than 2 years as shown in the following table.
| Five Year|
| Used as|
| Used as|
| 1/31/04 –|
|16 months|| || || |
| 6/1/05 –|
| || 22 months|
| 4/1/07 –|
| 22 months || || || |
| ||38 months||22 months|
Amy can exclude gain up to $250,000. However, she cannot exclude the part of the gain equal to the depreciation she claimed or could have claimed for renting the house, as explained later under Depreciation after May 6, 1997
William owned and used a house as his main home from 2003 through 2006. On January 1, 2007, he moved to another state. He rented his house from that date until April 30, 2009, when he sold it. During the 5-year period ending on the date of sale (May 1, 2004–April 30, 2009), William owned and lived in the house for 32 months (more than 2 years). He must report the sale on Form 4797 because it was rental property at the time of sale. 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
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, the amount you cannot exclude is the amount allowed. See Publication 544 for more information.taxmap/pub17/p17-084.htm#en_us_publink1000172466
If you used property partly as a home and partly for business or to produce rental income, see Publication 523.