With interest rates at 50-year lows, you might be thinking about refinancing a home or auto loan.

But what makes the best sense?

Would the long-term savings be worth the cost of refinancing? And what would refinancing do to your payments, your equity and the length of your loan?

You can crunch the numbers yourself using a wonderful tool with an unwieldy name: an amortization calculator. It's a free tool you can find online, and it will show you where every dollar of every payment goes during the term of a loan.

The great thing about these calculators is that you can try different scenarios. How would a 15-year or 20-year loan compare to a 30-year loan? Click, click, click.

How much would your current payments decline if you refinanced? How much interest could you save if you made extra payments? Click, click.

By the numbers

Amortization calculators make clear some important realities of long-term loans that aren't always obvious.

For example, you can see that with a 30-year home loan, even at today's rock-bottom interest rates, nearly 70 percent of your mortgage payments during the first five years goes to interest, and you accumulate little equity.

Finance the same loan amount with a 15-year term, and the payments increase, but most of your money goes toward equity in the very first year.

An amortization calculator can break down each monthly payment, or just show yearly totals.

Here's an example, showing how borrowing \$150,000 at today's interest rates plays out during the first three years of a loan, for a 30-year mortgage at 4.3 percent interest and a 20-year loan at 4 percent.

I used an amortization calculator at Bloomberg.com, www.bloomberg.com/personal-finance/calculators/mortgage, and rounded the numbers to the nearest dollar.

30 years, \$742 monthly:

20 years, \$909 monthly:

In this example, what's immediately clear is that while a shorter loan term raises the monthly payment, all of that additional money is turning into home equity instead of going toward interest. The roughly \$500 saved on interest in the first year turns into equity as well, and those interest savings increase each year.

In other words, you're taking money out of one pocket to make the higher mortgage payments, but you're putting it in your other pocket as home equity.

With a 15-year loan at the going rate of 3.4 percent, the change is even more dramatic.

15 years, \$1,065 a month:

Factors

Deciding what sort of loan makes the best sense for you, whether you're refinancing or buying a home, involves many questions about your finances and your personal philosophy about debt.

If you have no high-interest-rate loans, and you have an emergency savings account, and you can afford the higher payments, there's a good case to be made for going with a shorter loan term in order to reduce your interest expense and build equity.

On the other hand, if you have limited savings and carry some credit card debt, there's a good argument for keeping your mortgage payments as low as possible in order to focus on paying off those credit cards and building up savings.

If you're looking to refinance an existing mortgage loan, an amortization calculator can help you figure out how long it would take to recoup the costs associated with refinancing.

For example, a credit union I bank with estimates there would be nearly \$3,000 in closing costs to refinance \$150,000 in mortgage debt.

Let's say you borrowed \$150,000 five years ago, with a 30-year mortgage at 6 percent interest. Today, you would still owe nearly \$140,000. If you were able to refinance that amount, plus your closing costs, for 25 years (the remaining term of your mortgage) at 4.3 percent, your payments would drop from \$900 to \$779.

And here's where the amortization calculator comes in handy: In addition to cutting your monthly payment by \$121, you would also gain equity more quickly. In the five years after refinancing, you would pay down \$17,788 of the loan balance, versus \$14,053 if you hadn't refinanced, despite making lower payments each month, because less money would go towards interest.

So, check out an amortization calculator, run the numbers yourself and see what you can learn.

OF INTEREST

Fixed mortgage rates were mostly flat last week after hitting their lowest levels in decades, Freddie Mac said Thursday. Here's a look at rates for fixed and adjustable mortgages over the past 52 weeks.