NEW YORK (MainStreet) — Most taxpayers know that if you itemize, you can deduct mortgage interest on your homes. But many taxpayers are unaware of the special rules and limits for deducting mortgage interest.

You cannot simply deduct the gross amount of mortgage interest reported in Box 1 of each Form 1098 you receive.

"Qualified residence interest" (interest on debt secured by the residence) paid on your primary residence and one secondary residence can be deducted on Schedule A, subject to certain limitations.

You can only deduct interest on two properties at a time. If you own a personal residence in New Jersey and two separate person-use vacation properties, one in Florida and one in the Poconos, and all three properties have a mortgage, you can only deduct the mortgage interest on two of the properties.

There are three kinds of deductible qualified residence interest -

1) Grandfathered debt – debt acquired on or before October 13, 1987, that was secured by your main residence or a qualified second home. It doesn't matter what the proceeds of the loan were used for, as long as the debt was secured by the property. Grandfathered debt is not limited. Interest on grandfathered debt is deductible in full as mortgage interest.

2) Acquisition debt - debt acquired after October 13, 1987, to buy, build or substantially improve your main residence or a qualified second home. A "substantial improvement" is one that adds value to the home, prolongs the home's useful life or adapts the home to new uses. Acquisition debt is limited to $1 million ($500,000 if Married Filing Separately). Qualified acquisition debt cannot exceed the actual cost of the home and any substantial improvements. The $1 million (or $500,000) debt limit is reduced by any grandfathered debt.

3) Home equity debt – debt acquired after October 13, 1987, that is secured by a principal residence or second home that is not used to buy, build or substantially improve the property. There is no restriction or limitation on what the money can be used for; you can use it to buy a car, to pay for college, or to pay down credit card debt. Home equity debt is limited to $100,000 ($50,000 if married filing separately). The $100,000 (or $50,000) debt limit is reduced by any grandfathered debt in excess of $1 Million (or $500,000).

Refinanced acquisition debt actually qualifies as acquisition debt only up to the amount of the balance of the old mortgage principal just before the refinancing.

If you have done nothing but refinance acquisition debt to get better rates over the years - and you never took out a home equity loan, or opened a home equity line of credit, or refinanced to get cash and used the money for anything other than to buy, build or substantially improve a personal residence, you still may have home equity debt. The additional closing costs of each refinance that were added to the principal of the refinanced mortgage represent home equity borrowing.

The only way you would avoid home equity debt in this case is if you literally refinanced only the principal from each old mortgage and paid all closing costs in cash.

John and Mary purchased their home in 2011. They have only one mortgage, from the original purchase, and no home equity debt.

They want to refinance their original mortgage in 2014 to get a better rate. The principal balance on the original mortgage is $197,374. The principal balance of the new mortgage will be $200,000. They did not take any money "out" and actually paid a little over $1,000 at the closing. The difference is the closing costs for title insurance, inspections, fees, etc. John and Mary now have acquisition debt of $197,374 and home equity debt of $2,626.

If you have accumulated home equity debt of $150,000 you can only deduct the interest on $100,000. If your interest rate is 4% the most you can deduct for your home equity debt is $4,000.

It is important to keep a record of the separate acquisition and home equity debt for your home, and to update this record each time you refinance. Ask your tax professional for help in setting up this record.

--Written by Robert D. Flach for MainStreet