Interpreting the tax code can be difficult, even for the IRS, and sometimes that means you can benefit. An example is the recent IRS acceptance of a court decision on the proper way to calculate a deduction for home mortgage interest. Here’s what you need to know.

When you itemize, interest you pay on the mortgage on your main residence can reduce your taxable income. In some cases, mortgage interest on a second home is also deductible. But these deductions have “ceilings,” that is, limits on the amount of debt on which you can claim deductible interest.

One ceiling applies to loans you take out to buy, build, or improve your main home (and in some cases, a second home). Under this ceiling, the first $1 million of a mortgage secured by your home is considered “acquisition indebtedness,” and the interest you pay on this amount is generally deductible. The ceiling is $500,000 if you’re married filing separately.

Another ceiling applies to additional loans secured by your home. Interest you pay on the first $100,000 of this “home equity indebtedness” is generally deductible, subject to certain limitations, no matter what you use the money for. The ceiling is $50,000 if you’re married filing separately.

The two interest ceilings can interact if you have one mortgage exceeding $1 million. In that case, the first $1 million of your mortgage is considered acquisition indebtedness, and the first $100,000 of the balance is home equity indebtedness. The result: You can deduct interest paid on up to $1.1 million of your mortgage.

Or can you deduct even more? This was the question raised by unmarried co-owners of two residences. The taxpayers each deducted interest paid on $1.1 million on each residence, in effect raising the ceilings to $2.2 million.

The IRS disagreed with the deduction, but the court said the IRS was wrong — and the IRS has accepted the court decision.

The result? If you’re single and co-own a qualifying residence with another person, the amount of your interest deduction for current and prior years may be increased. Give us a call to discuss your options, including the opportunity to amend federal and state income tax returns.