M-MTax
Level 12

Investors & landlords

You can but you'll want to stay within the safe harbor:

 

(2) Replacement property. A dwelling unit that a taxpayer intends to be replacement property in a § 1031 exchange qualifies as property held for productive use in a trade or business or for investment if: (a) The dwelling unit is owned by the taxpayer for at least 24 months immediately after the exchange (the “qualifying use period”); and (b) Within the qualifying use period, in each of the two 12-month periods immediately after the exchange, (i) The taxpayer rents the dwelling unit to another person or persons at a fair rental for 14 days or more, and (ii) The period of the taxpayer’s personal use of the dwelling unit does not exceed the greater of 14 days or 10 percent of the number of days during the 12-month period that the dwelling unit is rented at a fair rental.

 

There's the self rental rule which means the net income from the rental is not passive income because you materially participate in the business that is renting real estate you own.