When You Meet the Use Test for the Business or Rental Part
If you have property, part of which is used as a home and part has been used for business or rental purposes, and you have met the use test for the business or rental part (you used it as your home for at least 2 of the last 5 years), how you treat the gain on the sale of the property depends on how you were using the business or rental part in the year of the sale.
Used for Business or Rental in Year of Sale
If you were actually using it for business or rental purposes the year you sell the property, you will have to treat the sale as two separate sales, one for the business or rental part and one for the part you presently use as your home. In this case, you would have to divide the selling price, selling expenses, and the basis in the entire property between the part used for business or rental purposes, and the part used as your home. Then, you would also have to allocate your exclusion amount between the two parts.
Generally you can exclude the gain on the business or rental part if you have met the ownership and use tests for exclusion of gain. You would report the sale of the business or rental part of the property on Form 4797 and would claim the allocated part of your maximum exclusion on that form. If you have depreciation allowed or allowable after May 6, 1997 on the business or rental portion, you will need to fill out the “Unrecaptured Section 1250 Gain Worksheet” in the Schedule D instructions, and then use the “Schedule D Tax Worksheet” to figure your tax.