Mortgages come in more flavors than Popsicles these days, causing many consumers to stand agog before the virtual grocery store freezer of home loan options. I'm not going to try to take on all these variables at one time. Let's talk for a moment only about the choice between 15-year and 30-year mortgages.

Many younger people and first-time home buyers will read that sentence, laugh, and immediately point and click their way someplace else. Pay for a home in less than 30 years? You've got to be kidding. Some people, looking at the six-figure cost of many homes these days, might even break out in a cold sweat at the prospect of paying an entire mortgage within 30 years.

There's a reason why mortgages come with 30-year terms (and occasionally even 40-year terms): because a house just isn't affordable without access to long-term credit.

What if you've been a homeowner for a while and you've built up some home equity? You may be older with more earning power than you had when you purchased your first home. Maybe you're thinking of refinancing, or you're considering moving. That's the time to weigh whether a 15-year mortgage might be a better choice for you. It's not always the best choice. Let's look at some of the factors to ponder.

Interest payments. The biggest financial advantage of a 15-year mortgage is that you pay less interest over time. There are plenty of amortization calculators on the Internet that can illustrate this phenomenon for you, including one right here at The Motley Fool that will compare a 30-year mortgage with a 15-year mortgage.

For the sake of an example, consider the financing of a $200,000 mortgage at a 6.25% interest rate. If it's spread over 30 years, the homebuyer will pay $243,316 in interest. The same loan, spread over 15 years, will cost $108,672 in interest, or less than half.

The flip side to this equation is that your monthly payments will be much larger when opting for a 15-year mortgage. This is where the more complicated analysis comes in.

Flexibility. Let's say you can afford making the larger monthly payments of a 15-year mortgage, but you have some uncertainties about the future. Maybe your job isn't stable, your health isn't good, or you're sending your first child off to college. In that case, you might not want to lock yourself into the higher monthly payments of a 15-year mortgage.

If you opt for the 30-year mortgage instead, you give yourself more financial breathing room. You can engineer your own 15-year schedule by sending bigger mortgage payments every month, while keeping open the option to fall back on the 30-year schedule if things get too tight.

Retirement. If you choose a 30-year mortgage, ask yourself what you'll do with the rest of the money that won't be going toward home payments. Your emergency fund may need an infusion. Or, if your retirement funds need some bolstering, it may be obvious that you need to put that extra money into your 401(k) or IRA accounts. You'll probably get tax benefits on top of the financial advantages of gaining more time to compound your investment earnings.

On the other hand, if you see retirement on the horizon, you might opt for a shorter mortgage. Who wants to be paying their mortgage out of their retirement funds?

Building equity. Opting for a shorter mortgage means building up home equity more quickly. If you're planning to move, you'll have a bigger down payment for purchasing your new home. In an emergency, you can tap that home equity through a loan. This may also be an advantage for anyone who just wants to see their debts shrink.

Tax deductions. It is, in my humble opinion, a mistake to decide that you need to take out a 30-year mortgage in order to take 30 years' advantage of the mortgage interest tax break. Don't get me wrong -- I love the mortgage interest deduction as much as the next tax-break-hungry homeowner. The deduction is a great discount on mortgage interest, but it doesn't wipe mortgage interest away. If you're no longer paying a mortgage, you're not getting the tax break, but you're also not paying the bank for the favor of borrowing money. So, consider this one variable but not necessarily the most important.

Variable X. How a mortgage fits into your financial plan depends on you -- your goals, your plans, your spending habits, your financial personality. Your dream to retire early and cruise the world on a sailboat may necessitate paying that mortgage off as fast as possible. Maybe you hope your grandchildren will visit you in the first and only home you purchase. Ask yourself whether a 15-year or a 30-year mortgage will best make your dream come true.

Look to our Home Center for piles of information about loans, equity, and the homebuying process.

Check out these other articles about homebuying and mortgages:

Want to get your finances on the right track? Check out our Motley Fool GreenLight newsletter service. You'll find help and answers to match up with your life and your money goals. Try it for free for 30 days.

Fool contributor Mary Dalrymple welcomes your feedback. The Motley Fool's disclosure policy is super-cool.