What do you do if you are loaded down with credit card debt but you know you should be saving for retirement? Do you concentrate on getting rid of the debt, and put off saving in the 401(k) or IRA for later? Or do you save now, pay off later?

There are two different answers to this quandary: One may make you feel better and perhaps move you further in the long run. The other is actually the best answer, but will only work if you are disciplined about getting rid of credit card debt.

So here goes the possible feel-good approach: Given the rigors of saving for retirement late in life, I suggest young people combine getting rid of credit cards with some retirement saving at the same time.

If you wait on saving until debts are paid off completely, you might never start saving, because too many people aren’t disciplined enough about wiping out their debts.

Simply consider the difference between a 20-year-old who saves a little each week, and a 45-year-old with nothing saved. If the 20-year-old invests just $20 a week in a stock market mutual fund in a 401(k) or an individual retirement account, she can end up with $1 million at retirement if the stock market performs the way it has historically.

At 45, a person who has saved nothing will need to save about $245 a week to end up in the same place as the person who started saving $20 at age 20.

Yet research by David Blanchett shows there is a better way. Blanchett is head of retirement research for Morningstar and recently completed an analysis looking purely at the numbers.

He found that if you can focus on what’s best for you in the long run and tackle those credit card debts until you have wiped them out, you can then save for retirement with better results. His calculations show that you can potentially increase your 401(k) balance by 14.1 percent over the person who just made minimum payments on credit cards while also saving for retirement.

For his analysis, Blanchett assumed a person had $400 a month that could be used either for credit card payments, the 401(k) or both. He found that a 30-year-old with $15,000 in credit card debt who simply paid the minimum on the cards wouldn’t get rid of the debt for 36.6 years.

But if the person devotes the full $400 a month to paying off the credit cards, the debts would be gone in 6.6 years. At that point, the person would start routing the entire $400 a month into a 401(k).

Sign up for our new business newsletter

We're starting a weekly newsletter about the business stories that are shaping Charleston and South Carolina. Get ahead with us - it's free.

By retirement, he said, the person would have $380,516. If, instead, the person had been making minimum credit card payments all along, and then devoting what was left of the $400 each month to a 401(k), he would have $333,608 for retirement.

Blanchett assumed for his example that the person’s employer was not providing any matching money for employees using 401(k) plans. If a match had been provided, Blanchett said he would advise putting enough money into the 401(k) each month to get the full match.

Then, he said, anything left from the $400 a month would go toward paying off more than the minimum on credit cards.

The reason minimum payments continually hurt is because interest keeps building. Blanchett assumed the interest rate at 15 percent, and assumed investments in the 401(k) earned on average 7 percent a year.

If the person had been investing in bonds earning 2 percent, getting rid of the debt would have been even more compelling.