Although mortgage debt is a long-term financial commitment you need to be aware of market conditions.

It pays to be on the lookout for better rates as interest rates rise and your financial goals change. There are many good reasons to refinance into a new mortgage that has different terms.

Reduce your monthly mortgage payment

Refinancing a mortgage to get a lower interest rate is the most popular reason. This allows you to reduce your interest cost and enjoy a lower monthly repayment.

Refinancing is recommended if your new mortgage interest rate is at least 2% lower than your existing one. If the new mortgage’s closing costs are lower than average, you might be able to benefit from smaller differences.

Fees equal to 3% to 6 percent of your loan amount will be charged to cover title search, appraisal, points, origination fees, and other costs associated with your new mortgage. Be sure you can afford the fees and stay in your home long enough for them to be repaid before refinancing to a lower rate.

Divide your monthly savings by the closing costs to calculate your break-even point. Let’s take, for example, $200 less monthly payments. It will take 40 months for you to break even if your closing costs are $8,000 ($8,000 divided by $200). If you are certain that you will be moving within three years, then it might make sense to continue your mortgage.

Even though your new payment may be lower, refinancing can end up costing more long-term if you are still paying your mortgage. This is because the more you move in your repayments, the higher the proportion of the payments that go toward principal and interest.

You can restart the principal-interest clock if you are 10 years into a 30-year loan and refinance to a new 30-year loan.

The new loan could result in you paying more interest than if you had stayed in your old home. It may not be worth it if you don’t intend to live in your current house for that long. If you do plan to stay in your current home for a long time, it is worth looking at the numbers.

First, calculate how many mortgage payments are left. Add the principal and interest payments to your current mortgage. This is not including taxes or insurance. Next, do the same calculations for the new mortgage to compare your total cost.

Consider your long-term goals as well, such as retirement and whether you want to continue paying that mortgage 30+ years down the road.

To switch mortgage loan type

You can save money by switching the type of mortgage loan. A Federal Housing Administration (FHA), for example, requires that you pay a mortgage insurance premium MIP over the loan’s life.

If you have 20% or more equity, refinance from FHA loan to conventional loan to get rid of the MIP. Even if your equity is less than 20%, you may still pay less for a non FHA loan because FHA loans have higher interest rates.

Switching from an adjustable-rate to fixed-rate mortgage — or vice versa

An adjustable-rate mortgage (ARM) may offer lower initial rates and monthly payments than a fixed rate mortgage. They are a popular choice for new homebuyers.

There is a chance that your monthly payment could increase as the adjustable-rate rate resets. You can refinance to a fixed-rate mortgage if you already have an ARM, but you want the security of knowing that your payment will be locked in at current interest rates.

You can change from a fixed-rate mortgage to an ARM. The ARM interest rate can increase over time so it is riskier to move if you intend on remaining in your home for a longer period.

To shorten the mortgage loan term

Many people feel that financial security is only possible when they are debt-free. This makes paying off your mortgage a priority. You may be able to refinance a 30-year-old mortgage into a shorter term such as 15 or 20, if you have a 30-year mortgage.

If you are a long-term holder of your mortgage and want to get lower rates without having to extend your term, this can be a great option.

A shorter term will result in higher payments, all things being equal. However, if rates have fallen since you purchased your home, it may not make a big difference.

You don’t need to refinance in order to reduce your payoff period. You can make extra payments of principal each month, or when you receive windfalls like an annual bonus. This will allow you to stay ahead of the curve without having to refinance. Check with your lender to make sure your mortgage does not have a prepayment penalty.

To cash out equity in your home

Equity is a difference in the appraised value of your home and what you owe. You could refinance to a bigger mortgage to get cash to spend on other goals.

You could, for example, use a cash out refinance to repay higher-interest debts. You could take advantage of the lower interest rate and also get the federal income tax deduction. This is generally available for mortgages, but not credit cards or auto loans. Consult your tax advisor.

Cash-out refinances can be dangerous. You might end up with lower equity in your home if you continue to carry higher-rate debt, such as credit card debts. Make sure you address the spending and budgeting habits that led to the debt.

To take advantage of improved credit

You may be eligible for a lower rate if your credit score has increased significantly since you signed your mortgage.

Your lender may be able to offer you better terms on a mortgage or another product if your credit score has improved.