You might think choosing between buying Walgreens Boots Alliance (WBA -0.80%) or Rite Aid (RAD -51.21%) stocks is an easy decision. Walgreens is bigger and profitable, while Rite Aid is struggling.

But maybe, just maybe, deciding between these two pharmacy stocks isn't such a slam dunk. Here are the arguments for investing both Walgreens and Rite Aid -- and which stock should be the bigger winner for long-term investors.

Customer standing in a pharmacy aisle holding a pill bottle

Image source: Getty Images.

The case for Walgreens Boots Alliance

Let's first put to rest one reason to buy Walgreens stock: the possibility that it could be taken private in a leveraged buyout. Yes, such a deal could very well happen, even though there hasn't been any confirmation of discussions so far. However, buying Walgreens in the hopes of a pop if a buyout is announced isn't a good reason for investing. It's just speculation.

There are more solid reasons to invest in Walgreens Boots Alliance, though. Demographic trends should work in the company's favor over the long run as Americans age and are more likely to need prescription drugs. Walgreens' size should enable it to benefit nicely from this long-term trend.

Walgreens is also moving forward with a cost management program that should lead to increased profitability in the future. The company recently upped its projected annual cost savings from this program from $1.5 billion to $1.8 billion.

Don't overlook Walgreens' partnerships to build more services centered around its pharmacy. The company expanded its collaboration with LabCorp to offer more lab patient service centers at Walgreens stores. It's working with partners across the U.S. to provide healthcare services in its stores. On the retail side, Walgreens and Kroger are piloting the pickup of Kroger products at select Walgreens stores and the launch of several Walgreens-branded products in Kroger stores.

Walgreens also could be attractive to investors who love dividend stocks. Its dividend currently yields around 2.9%. The company has boosted its dividend for 44 consecutive years and should be able to keep the dividend increases coming in the future.

The case for Rite Aid

Why consider buying Rite Aid stock? The company could turn things around under the leadership of new CEO Heyward Donigan. Her track record includes serving as CEO of Sapphire Digital and ValueOptions and as chief marketing officer at Premera Blue Cross. She led each of these organizations to deliver solid revenue and earnings growth.

The demographic trends that should benefit Walgreens should be a tailwind for Rite Aid as well. Even though Rite Aid is smaller than it has been in the past after the sale of a large number of stores to Walgreens, it still has over 2,500 stores across the United States.

Rite Aid's key partnerships could also drive growth. The company teamed up with Amazon.com to provide pickup locations for Amazon products at more than 650 stores with plans to expand the service to every Rite Aid store in the future. This initiative could boost retail sales for Rite Aid as customers spend in its stores when they come to pick up Amazon products.

The company also partnered with Adobe to revamp its digital business. Rite Aid plans to launch a new personalized online experience for its customers early next year across multiple digital channels. It expects this effort will increase both in-store and online sales.

Perhaps the best reason to think about buying Rite Aid stock is its valuation. The stock trades at little over half its book value. If Donigan can successfully lead a solid turnaround for Rite Aid, its current share price could look like a dirt cheap bargain in retrospect a few years from now.

Better buy

While I'm cheering for Donigan to engineer a spectacular comeback for Rite Aid, I think Walgreens Boots Alliance is still the better pick right now. It's simply too much of a climb for Rite Aid to overcome Walgreens' advantages of profitability, scale, and its attractive dividend.

However, my view is that neither of these stocks is a great choice for investors. With the headwinds in the retail pharmacy industry, I think there are too many other stocks that can deliver better growth (and, yes, better dividends) than Walgreens or Rite Aid.