If you rent out your entire home or even a room in your home (or your vacation property) for at least 15 days in a given year, you can get a surprising tax break under the new federal tax law. How it works: As a short-term landlord, you can get around the new law’s caps on deductions for property taxes and mortgage interest.

Example of deducting property tax: Let’s say that your annual property taxes total $14,000. The new tax law lets you deduct a maximum of $10,000 of combined property taxes and state and local income taxes. Say you rent out 50% of your home for half the year, but use the home yourself for the other half of the year. You can deduct 50% of that six months’ worth of property taxes—25% of the total property tax bill, or $3,500, on federal Schedule E, “Supplemental Income and Loss.” You also can deduct $10,000 on your Schedule A for itemized deductions, giving a total deduction of $13,500 rather than just $10,000.

Example of deducting mortgage interest: Under the new law, for any first or second home you bought after 2017, you can deduct interest on up to $750,000 of the mortgage loan (compared with $1 million previously). But rental property has no such cap. So if you rent out, say, 50% of a home that carries a $900,000 mortgage, you can deduct interest paid on the first $750,000 of that loan, as well as interest on half the remaining $150,000.

Note: Even if you opt for the ­standard deduction rather than itemize—which means that you can’t take the standard type of property tax and ­mortgage-interest deductions—you still can take deductions corresponding to the amount of time your house or a portion of it was rented out. More information: IRS.gov/forms-pubs/about-publication-527Remember: The recent changes to the tax law are very new, and it’s unclear how the IRS will interpret them, so consult a knowledgeable tax professional to make sure you’re in the clear.