Shares of beleaguered retailer J.C. Penney (OTC:JCPN.Q) soared by more than 25% the day after the company reported better-than-expected earnings. It's clear from the results that J.C. Penney, while still far from profitable, is in no immediate danger of running out of cash, and both sales and the gross margin appear to have finally bottomed out.

While J.C. Penney performed better than I expected during the holiday season, those euphorically buying the stock need to keep their expectations tied to reality. Even under the best-case scenario, shares of J.C. Penney are not attractive.

The good news
Same-store sales increased by 2% year over year in the fourth quarter, a number announced earlier this month. This is the first time that J.C. Penney has managed to grow same-store sales since the second quarter of 2011, marking an important reversal, and the company had guided for mid-single-digit same-store sales growth in 2014.

The gross margin in the fourth quarter improved by 460 basis points year over year, rising to 28.4%; that's well below historical levels but a big improvement compared to the fourth quarter of 2012. J.C. Penney expects the gross margin to "improve significantly" in 2014 compared to 2013, but exact numbers were not given. Selling, general, and administrative costs declined during the quarter, falling by 17% year over year, as the company has taken steps to rein in spending. J.C. Penney expects SG&A expenses for 2014 to be similar to 2013.

J.C. Penney will spend just $250 million in capital expenditures in 2014, down from nearly $1 billion in 2013. This, combined with the higher gross margin and lower operating expenses, has given J.C. Penney investors reason to believe that the company is well on its way to profitability.

A few problems
J.C. Penney is a different company than it was a few years ago. Revenue in 2013 was just 60% of peak revenue in 2007, and the company's $5.5 billion in debt has greatly increased the annual interest payments. While the thought of J.C. Penney returning to $1 billion in annual net profit is nice, it's not realistic.

Below is a chart of J.C. Penney's adjusted free cash flow for 2014 as a function of both the gross margin and revenue growth. I calculated the adjusted free cash flow by taking the gross profit and subtracting SG&A expenses, interest payments, and capital expenditures. This ignores non-cash items like restructuring charges, and it ignores temporary changes in working capital. This should give a reasonable picture of the real profitability that J.C. Penney can achieve in 2014. I've assumed that SG&A expenses will fall to $4 billion with $400 million in annual interest payments and $250 million in capital expenditures.

The green area is where the free cash flow turns positive. The light red area is where J.C. Penney loses less than $1 billion, and the dark red area is where J.C. Penney loses more then $1 billion. If the company grows revenue at 5%, the gross margin needs to rise to about 37.5% in order to break even for the year. That's less than 2 percentage points lower than the peak of 2007, and that kind of improvement is unlikely to happen in a single year.

J.C. Penney will almost certainly lose money in 2014, although the loss could be as small as a few hundred million dollars if the gross margin rises into the mid-30s. With $1.5 billion in cash, it seems like J.C. Penney has at least a few years to grow the gross margin back to peak levels. At a 39% gross margin and 5% sales growth, the adjusted free cash flow would be about $200 million before taxes, making the current market capitalization seem reasonable.

But there's a big problem with this story. Capital expenditures, which J.C. Penney expects to be $250 million in 2014, are not sustainable in the long term at that level. CFO Ken Hannah, responding to a question during the company's conference call, stated:

I would say since we spent almost $1 billion in capex last year, one would argue that we have not underspent in our store environment, so I think we can live on a diet for a little while. Does not have to be to 250, it could be 350 or 500, but [tailor] to the opportunities we have as merchandise well with the customer.

Capital expenditures are going to rise over the next few years, and they should eventually approach depreciation, which sits at around $600 million today. This completely wipes out any profits, even under the best-case scenario, and it leaves J.C. Penney in a difficult situation. Even if the company gets the gross margin up to 39% this year, growing sales by 5%-7%, the free cash flow essentially goes to zero or less once capex goes back to sustainable levels. From there, the gross margin can't go much higher, so the only path to profits is revenue growth.

The bottom line
It will be next to impossible for J.C. Penney to do better than breakeven over the next few years, as high interest payments and drastically lower revenue work against the company. The low capex level in 2014 is deceptive, and that number will necessarily rise over the next few years. Can J.C. Penney eventually return to serious profitability? Sure, but the company needs to get revenue closer to peak levels in order to do it. And with growth in the mid-single digits, that's going to take a long time.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.