Deductions & credits

It depends.  If you refinance with a new lender, you can deduct the amount of unamortized points on the mortgage in full, in the year that the mortgage is paid off.  If you refinance with the same lender, the mortgage isn't quite being "paid off" (and then transferred to a new lender).  In that case, you cannot deduct the unamortized points because they remain with the original lender and simply transfer to the new loan.