As mortgage rates fluctuate, how do you know whether now is a good time to refinance? An online refinance calculator can help you make the right choice.

Refinancing your home is an important decision — one that can help to decrease the amount of your monthly payments and even shorten the life of your loan. However, refinancing sometimes doesn’t make sense from a financial perspective. For example, if you have less-than-stellar credit, you likely won’t qualify for the best refinance rate. Also, if you plan to sell your home in the next year or two, you probably want to avoid paying the closing costs associated with a refinance.

To determine if the time is right for you to refinance, take Bankrate’s refinance calculator for a spin. First, plug in a number of factors, including your current monthly payment, current interest payment and the remaining balance on your mortgage. You will also need to know your new interest rate, the number of years left on your current loan term and the number of years on your new loan term as well as fees, such as application fees and appraisal fees.

The tool then will calculate the total cost of refinancing your home and reveal your new monthly mortgage payment. Once you see how much it will cost to refinance, you can figure out how long it will take before the new, lower monthly payment saves you enough money to cancel out the expenses you will pay at closing.

If the refinance calculator suggests that a new loan makes financial sense, don’t delay. Although it’s impossible to know whether today’s mortgage rates will continue on their current trend downward, you can take some uncertainty out of the matter by visiting a lender and locking into a low rate today.