Nothing has been going right for Rite Aid (RAD -10.00%) this year.

In January, Walgreens Boots Alliance (WBA 0.91%) changed the terms of its bid to buy the smaller pharmacy chain in a way that wasn't beneficial to Rite Aid. Ultimately, though, Walgreens ended up abandoning its acquisition attempt altogether. Along the way, Rite Aid continued to post dismal quarterly results. And the company's CEO left just a few days ago. It's no wonder the stock is down a whopping 70% so far in 2017.

Is Rite Aid a lost cause? Maybe not. Here's why the stock just might be a gold mine for value investors. 

Man pushing plastic toy cart with bars of gold overflowing in basket

Image source: Getty Images.

Throw away most standard metrics

First of all, you'll need to throw away most of the standard metrics used to determine if a stock is attractively valued. The most commonly used metric is the price-to-earnings (P/E) ratio. That measure doesn't work for Rite Aid for a simple reason: It doesn't have positive earnings. Rite Aid lost over $96 million in the first half of 2017. 

Another popular valuation metric is enterprise value-to-earnings before interest, taxes, depreciation, and amortization (EV/EBITDA). Rite Aid's EV/EBITDA ratio currently stands over 10. That's not indicative of an especially attractive valuation.

What about the price-to-book ratio? That metric isn't too helpful in making the case for Rite Aid as a value opportunity, either. Rite Aid's price-to-book currently stands a little over 4.6. That's a relatively high level not typically associated with a stock that is attractively valued. In Rite Aid's case, that high price-to-book ratio doesn't come with a high return on equity (ROE). In fact, Rite Aid has a negative ROE. That's a pretty damning combination.

One measurement that looks more encouraging for Rite Aid is its price-to-sales ratio of 0.08. That's only a fraction of the price-to-sales ratios of other large pharmacy chains. However, one major drawback of this metric is that it doesn't factor in debt. Rite Aid currently has a huge debt load of more than $7 billion. 

Another perspective

However, we have another way of assessing the value of Rite Aid stock. To help understand this other approach, let's use an analogy. Suppose you have 10 acres of land that have been appraised at $1,000 per acre. Based on the appraisal, your property would be worth $10,000. But also suppose that someone has offered to buy 5 acres from you at $2,000 per acre. How much is your property really worth?

The simple answer is that your 10 acres should actually be valued at $20,000 rather than the appraised value of $10,000. This assumes, though, that each acre is worth the same amount. It's possible that the buyer gets some of your land with more trees on it, for example, that make the property worth more than what you have after the sale. It's also possible that the land the buyer wants is more valuable to him or her than it would be to someone else -- perhaps the buyer has adjoining land to the desired 5 acres.

This analogy is similar to Rite Aid's current scenario. Walgreens has proposed to buy 2,186 stores from Rite Aid along with three distribution centers for nearly $5.2 billion. Rite Aid has 4,523 stores, so the deal would leave the company with 2,337 stores.

Walgreens' offer puts a price tag of roughly $2.3 billion on each store it wants to buy from Rite Aid. If we used that figure for all of Rite Aid's stores, the company should be worth in the neighborhood of $10.4 billion. Rite Aid's market cap right now, though, is only $2.6 billion.

The first question that comes to mind is this: Is Walgreens getting the most profitable stores and leaving Rite Aid the dregs? That doesn't appear to be the case. Rite Aid says its remaining stores would have higher sales and are more profitable on average than its current portfolio. 

Just as in our analogy, we should also try to determine if the purchase is more valuable to the buyer than it would be to someone else. That's a tougher question to answer. My best guess is that Walgreens probably is paying more per store than others would be willing to pay. However, I doubt the premium is outrageously high.

Gold mine?

Whether or not Rite Aid is a potential gold mine for value investors depends on three things, in my view. First, and most important, it hinges on the Federal Trade Commission's (FTC) approval of the proposed Walgreens deal. I think the purchase will be approved -- though, in the interest in full disclosure, I was also cautiously optimistic that the FTC would give a green light to Walgreens' initial plan to acquire Rite Aid. 

The next two conditions are an either/or proposition, assuming there are no problems with the Walgreens deal. If Rite Aid can be profitable and grow earnings with its remaining stores, the stock should eventually be worth a lot more than it is now. The other possibility is that Rite Aid gets bought out at some point after the Walgreens deal closes, either by another pharmacy chain or a private equity investment group. If that happens, I would expect a bid much higher than the current share price. 

I think the odds are better than even that Rite Aid stock will be a gold mine for value investors who aren't afraid to take on considerable risk. However, it could take a while before any gold comes out of this mine.