Refinancing
Refinancing replaces the loan with a new one, usually at a lower rate, for closing costs. A simple test:
Break-even months = closing costs / monthly payment saving
Compare like with like. Stretching a loan with 22 years left into a new 30-year loan lowers the payment partly by adding 8 years of payments, which can raise total interest even at a lower rate. Rolling closing costs into the new loan raises its balance and shrinks the saving. A client who expects to move before the break-even should not refinance.