You can only deduct home mortgage interest to the extent that the loan proceeds from your home mortgage are used to buy, build, or substantially improve the home.
For example: If you took a $10,000 home equity loan but used $4,000 for a vacation and the other $6,000 to improve your home, you would only be able to deduct interest on the $6,000 you used for your home.
Exception: If the loan were taken out on or before October 13, 1987, and the loan qualifies as grandfathered debt, all the interest would be fully deductible.