When you look at the most financially successful people, it certainly leaves you wondering: What’s their secret? Is there something they know that I don’t?

In a recent MarketWatch interview, tech billionaire Mark Cuban revealed a sage piece of advice regarding investment and debt. According to Cuban, the best investment you can make is to pay off your credit cards.

Is it really that simple?

Of course, no one becomes a billionaire simply by paying off credit card debt. But when it comes to improving your financial health, there are few investments that can match. If you’re holding more credit card debt than cash or investments in your bank account, then you’re in the red financially. According to Cuban, rather than putting money into real estate or the stock market, what you really need to focus on is paying off your credit cards.

His math is simple and his reasoning is sound. Imagine you have a credit card that’s carrying a $10,000 debt with a 20 percent annual interest rate. That debt is costing you $2,000 a year. Now, imagine you had $10,000 to invest and you’re deciding where to invest it. If you pay off your credit cards with this money, you’ll be saving $2,000 that you would have had to spend in interest payments. Two thousand dollars saved is $2,000 earned. You will receive a 20 percent return on that investment after a year — and that is an incredible rate of return that any billionaire would approve of.

The same principle applies to other kinds of debt

Regardless of what kind of debt you’re currently holding, paying it off should be your priority — especially if it has a high interest rate. When you take advantage of the being debt free, you can start investing in other kinds of things that — even though they won’t be as profitable as paying off your credit cards — will be helping you get further and further away from ever being in debt trouble again.

Bankruptcy could help if you don’t see a light at the end of the tunnel

If you don’t see a way out of your debt — and your income simply isn’t enough to ever pay off your credit cards — Chapter 7 or Chapter 13 bankruptcy could be the answer you need. Before you choose a debt resolution option like bankruptcy, however, make sure you fully educate yourself on the potential advantages and disadvantages of bankruptcy proceedings.