Americans hold $8.88 trillion of mortgage debt, according to a February report from the Federal Reserve Bank of New York. It's the largest type of household debt in the country, and it increased "substantially" during the fourth quarter of 2017 — up $139 billion, according to the report.
If you're one of those millions of people with a mortgage, your top priority should be paying it off before retirement, according to Kevin O'Leary.
"If you want to find financial freedom, you need to retire all debt — and yes that includes your mortgage," the personal finance author and co-host of ABC's "Shark Tank" tells CNBC Make It.
You should aim to have everything paid off , from student loans to credit card debt, by age 45, O'Leary says.
"The reason I say 45 is the turning point, or in your 40s, is because think about a career: Most careers start in early 20s and end in the mid-60s," O'Leary says. "So, when you're 45 years old, the game is more than half over, and you better be out of debt, because you're going to use the rest of the innings in that game to accrue capital."
Americans are increasingly likely to retire with debt , according to a 2018 study in the American Economic Association Papers and Proceedings. More than 70 percent of Americans between the age of 56 and 61 were in debt in 2010, according to the study. That number is up 64 percent from 1992.
But unlike other types of debt (like big credit card bills), taking out a mortgage on a home that appreciates in value can be a smart decision. In 2017, homeowners with a mortgage saw the equity in their home increase in value by an average of $15,000 according to CoreLogic.
"Mortgages are more of a gray area than credit card debt, because real estate can be an investment," O'Leary explains. Still, he advises you to think long and hard before taking on a mortgage at all.
"It's not always a good investment, and in my opinion, most people in their 20s, or even 30s, have no reason to be taking on that kind of debt," he says. "Homes don't always gain as much value as you expect — at least not anymore, and at least not quickly."
Indeed, with interest rates on the rise , borrowing money is becoming more expensive. For the week of June 7, the 30-year mortgage rate was 4.54 percent, according to Freddie Mac.
If you do decide to take on debt to buy a home, O'Leary's advice is simple: Get it paid off as soon as you can. If you already hold a mortgage on your home, O'Leary argues paying it off should take a higher financial priority than using extra cash to invest in things like stocks or bonds.
"There's never an incentive to stay in debt," O'Leary says. "Life is unpredictable. What happens if you're laid off or incur unexpected expenses elsewhere? Your once-manageable mortgage is suddenly going to seem not-so-manageable."
Personal finance expert Suze Orman agrees . If you plan to stay in your home through your golden years, you should get your mortgage paid off before you retire.
"You should be grabbing every opportunity you can to eliminate the known risks in your retirement plan," Orman writes in Money. "If you know you want to stay in your home, paying off the mortgage is a great way to build security."
Self-made millionaire and wealth management expert David Bach even says paying off your mortgage as quickly as possible is a step toward retiring early.
"I can tell you, having been a financial advisor at Morgan Stanley, my clients who retired at 50 years old, the secret was: They had paid their mortgage off early," Bach tells CNBC Make It. With a 30-year mortgage, make a plan to pay it off in 20, or preferably 15 years, he says. To do that, contribute an extra 20 percent to your monthly mortgage pay by scrimping and saving elsewhere.
But, other experts see the issue differently. There are drawbacks to prioritizing mortgage payments over potentially lucrative investments in things like stocks or bonds. Also, there are varying tax implications.
So before you decide to pay off your mortgage early, consider a few questions to pinpoint your financial goals: Where will your money earn the greatest return? What level of risk are you willing to take? How much access to your money do you need? Then, make the best decision for you.
If you ask O'Leary, the decision simple: "Debt is evil."
Don't miss: Kevin O'Leary: Unless you can pass this two-question test, don't buy a home
Like this story? Subscribe to CNBC Make It on YouTube!