15-year mortgages have a clear benefit over 30-year mortgages when it comes down to all-in costs. 15-year mortgage rates are a fraction of 30-year mortgage rates, and homeowners stand to cut their interest costs significantly with shorter-term mortgage loans. But that doesn't always mean a 15-year mortgage is best for all, and you should consider many factors before diving in.

In the video segment below, The Motley Fool analysts Kristine Harjes and Nathan Hamilton discuss one reason why homeowners may want to avoid a 15-year mortgage.

5 Simple Tips to Skyrocket Your Credit Score Over 800!
Increasing your credit score above 800 will put you in rare company. So rare that only 1 in 9 Americans can claim they're members of this elite club. But contrary to popular belief, racking up a high credit score is a lot easier than you may have imagined following 5 simple, disciplined strategies. You'll find a full rundown of each inside our FREE credit score guide. It's time to put your financial future first and secure a lifetime of savings by increasing your credit score. Simply click here to claim a copy 5 Simple Tips to Skyrocket Your Credit Score over 800.

Kristine Harjes: Given the choice between owing money for 15 years versus 30 years, it might seem pretty obvious that you would want to choose the 15 years, having no other information.

Nathan Hamilton: From an interest perspective.

Harjes: Yeah. But when you look at mortgages, there are so many people -- in fact, the majority of people -- that opt for the 30-year. It turns out there are actually very good reasons behind that. Today, we wanted to share with our listeners one very important reason why you may want to avoid a 15-year mortgage.

Hamilton: Yeah. It's important to us, as investors, looking at it. If getting a 15-year mortgage impedes your ability to invest in the stock market, it may not be the best option. If you look at it, about 52% of Americans have had to make at least one major sacrifice in their lives to, essentially, pay their monthly mortgage payment.

What that means, it could be tuition. It could be a new car -- not buying a new car. It could be not going out to eat out at restaurants. Major purchases. But for a lot of people, what it will mean, undeniably, is not investing in the stock market as much as they could. If you look at the rates of the return, between stock market and housing markets, there's a pretty significant difference. If you apply that over 30-year terms -- even longer if you're young and looking to retire -- it may not make sense to do it. It may make sense to take a 30-year mortgage, save more on the payment and the difference between those payments, invest in the market.

Harjes: Exactly. When you look at the difference in rates between a 15-year and a 30-year and you run that calculation between the opportunity cost of not putting your money in the stock market where you can make, conservatively, an 8% return, every single year over the long term.

Hamilton: Over the long term.

Harjes: All of a sudden, it might make a lot more sense to go for that longer 30-year mortgage.

Hamilton: If you look at a tip to figure out what would be a good step forward, is reverse engineer it. First off, figure out what your retirement goal is. Is it a million dollars? Is it 1.2? Is it $800,000? Whatever you need in spending. There are tons of calculators out there -- some on our website. Some on other people's websites are useful. Figure out what that end goal is and then figure out what you have to invest, each month, to get there. If you work out the numbers, you'll start to have an idea of, "Here's exactly what I can afford for my monthly mortgage payment. Here's a size of the house. Here's enough that still gives me room to invest and reach those longer term goals."

Harjes: Exactly. If you're looking for a calculator, like the one that Nathan is describing, you can check it out at fool.com/mortgages. While you're there, you can also get access to some highly rated lenders with low rates. You can even download our free guide called, "Five Tips to Increase your Credit Score Over 800."