Yes. As long as you don’t rent out a second home for more than 14 days each year, you can deduct the mortgage interest you pay on it. But your deduction is capped at the interest you pay on up to $1 million of debt on your first and second homes combined. You can also deduct property taxes on your first and second home. All of these deductions are only available if you itemize.

If you change your mind about renting the lake house to others, you’ll still be able to deduct the mortgage interest as long as you don’t lease it out for more than two weeks a year. And any rental income you receive will be tax-free, too, if you stay within the two-week limit.

If you rent out the house for longer than that, you’ll have to report the rental income to the IRS. But you can still deduct some of the mortgage interest and rental expenses, such as insurance and utilities, for the portion of the time that you rent out the house. Calculating the deduction gets complicated because you’ll need to determine how much of those costs should be allocated to when you were leasing out the house and when you were personally using it.