If you rent a dwelling unit to others that you also use as a residence, limitations may apply to the rental expenses you can deduct. You're considered to use a dwelling unit as a residence if you use it for personal purposes during the tax year for a number of days that’s more than the greater of:
- 14 days, or
- 10% of the total days you rent it to others at a fair rental price.
https://www.irs.gov/taxtopics/tc415