J.C. Penney (JCPN.Q) is in the midst of one of the most remarkable turnarounds in retail history. Just three years ago, the company looked like it was following Sears Holdings (SHLDQ) down the road to ruin. Sales were plunging, and free cash flow was dreadful at negative $2.75 billion.

Since then, J.C. Penney has returned to steady sales growth. Most important, it has generated positive free cash flow for two consecutive years. This allowed J.C. Penney to start reducing its debt load, which helped it snag a credit rating upgrade late last month.

Yet J.C. Penney shares still trade for under $10. The stock has jumped about 50% since late January, but it still trades for significantly less than it did three years ago, when the company seemed to be spiraling toward bankruptcy.

JCP Chart

J.C. Penney Stock Performance. Data by YCharts.

J.C. Penney still faces plenty of risks as it tries to complete its turnaround. But there is huge upside for patient investors, as long as J.C. Penney can continue to control its costs while slowly rebuilding its revenue base.

Costs are the key to the turnaround
J.C. Penney has posted two straight years of revenue growth. (We'll come back to that in a moment.) But its recent earnings improvements have owed much more to cost cuts.

In fiscal 2011 -- before J.C. Penney's failed strategy shift -- the company spent $5.1 billion on selling, general, and administrative (SG&A) expenses. By last year, SG&A had been reduced to $3.8 billion.

Some of these expense savings came from headcount reductions as J.C. Penney closed stores and matched labor usage to lower sales in its remaining locations. But J.C. Penney has continued to reduce its SG&A spending in the past two years, even as revenue has started to grow again.

Due to J.C. Penney's deep expense cuts, analysts expect the company to post a modest profit this year even though revenue is projected to be about $13 billion, down nearly 25% from fiscal 2011.

Can J.C. Penney keep revenue rising?
Of course, to push its earnings further into the black, J.C. Penney must keep revenue growing. The company has several key initiatives that could help on this front.

Most important, it is expanding its highly successful Sephora mini-shops. Sephora boutiques in J.C. Penney stores have posted better sales trends than other departments, while bringing in new customers. In addition to adding more Sephora shops, J.C. Penney is also redesigning nearby areas of the store to make them more appealing and encourage customers visiting the Sephora boutiques to shop the rest of the store.

J.C. Penney will add more Sephora boutiques in its stores this year. Image source: J.C. Penney.

J.C. Penney has also rebranded its in-store salons in partnership with fashion magazine InStyle. Like the Sephora boutiques, J.C. Penney's salon departments have huge potential in terms of driving customer traffic to the stores.

Another area with big potential is appliances. J.C. Penney began selling appliances in a few markets in February. The move back into appliance sales after more than three decades will allow J.C. Penney to better utilize space in its underperforming home department. It could also help the company win customers away from Sears, which still sells a lot of appliances.

Longer-term, the likely demise of Sears -- the only other big mall-based department store in the low-mid price segment -- represents a huge opportunity for J.C. Penney. Even if Sears manages to hang on for years by selling off real estate piecemeal, it will almost inevitably hemorrhage sales as it downsizes its store base.

Huge operating leverage
Department stores clearly face stiff competition from online retailers. As a result, J.C. Penney isn't likely to post torrid revenue growth. However, even steady 3% to 4% annual revenue gains could drive huge profit growth over the next several years.

Modest revenue increases can drive strong profit growth at J.C. Penney. Image source: The Motley Fool.

That's because J.C. Penney has massive operating leverage -- revenue increases drive disproportionate profit growth. J.C. Penney's gross margin is about 36% today, which means that it keeps $0.36 of every $1 in sales after accounting for the cost of buying inventory and transporting it to stores.

As a result, if J.C. Penney can keep SG&A flat, its operating profit will rise by $0.36 for every $1 of sales growth it achieves.

Even with a modest 3.5% compound annual sales growth rate, J.C. Penney's sales would rebound to $15 billion by 2020, up from $12.6 billion last year. With flat expense levels, that would boost operating profit by roughly $850 million.

Of course, there's no guarantee that these sales gains will come or that J.C. Penney will be able to hold costs flat. (The company does expect SG&A expense to decline in fiscal 2016, though.) But if J.C. Penney manages to keep sales growing steadily, its market cap should rocket higher from its meager level of $3 billion today.