With interest rates keeping steady at the lowest rates in 30 years, many people are refinancing homes to save money long-term.

Regardless of your reasoning, says Julie Good-Garton, author of All About Mortgages: Insider Tips for Financing and Refinancing Your Home (Dearborn; $15), you need to do the math before you trade in one home loan for another. If the new loan’s not right for you, you could end up wasting time and in some cases, spending more money. Consider the following tips if you are thinking about refinancing your home:

Costs: Add up all of the costs; these could include points and fees for the application, loan origination, appraisal, attorney, credit report, extra insurance, inspections and others. There are costs associated with any new loan.

Monthly Savings: Figure your monthly savings by subtracting your current monthly payment from your refinanced mortgage monthly payment. In some cases, your savings could be very good. In other cases, it may be very small.

Tax Cost: Multiply your monthly savings by your combined state and federal tax rate. There are tax advantages attached to your mortgage.

Net Savings: Take the amount that you saved in monthly costs for the loan and subtract the additional tax costs. This will tell you your total savings. Be sure to divide the tax by 12 months so that you get an accurate picture of the monthly savings.

Break-Even Point: Divide your total costs by your net savings to determine how many months it will take to pay off the cost of refinancing. For example, if you save $100 per month on the refinanced loan and the refinanced mortgage costs you $2,500, it would take you just over two years to break even and start enjoying the savings.

Hidden Costs: If your current loan contract includes a prepayment penalty, you’ve got to factor it in, too. Some penalties can be as high as six months interest on 80 percent of your balance, but diminish the longer you hold the loan.