You can deduct interest on up to $750,000 in mortgage debt. This can be spread across both a main, primary residence and a second home. So if your first home has a mortgage of $200,000 and your second home a mortgage of $500,000 ($700,000 total), you’d be able to write off the full amount of your interest paid across the year.
The IRS does not allow you to write off interest on third homes or beyond. If you own an investment property, you’ll likely deduct its interest and other costs as business expenses. Be sure to speak with a tax professional before making any decisions.