Any mortgage loan that is used to buy, build or improve your home can qualify for the mortgage interest deduction. That includes the loan you are left with after completing a refinance.