Whether you're looking for passive income or for growth, both AbbVie (ABBV 1.05%) and Walgreens Boots Alliance (WBA -0.06%) might be of interest. The pair pay decent dividends, operate with business models that are proven to be sustainable over time, and aren't in deep danger of running afoul of longstanding economic trends. Likewise, even if there's trouble in the economy, both companies have defensible market shares and enduring appeal to their customers.

But there's no way that a pharmaceutical juggernaut like AbbVie and a massive pharmacy chain like Walgreens could be equal in terms of their future potential. The differences between the two are too many to list. Let's break down the appeal of both stocks so that you'll know which is the better buy, given where they're likely to go over the next few years.

AbbVie's rolling drug launches continue to pay off

The primary reason to invest in AbbVie is that its drug development pipeline is a powerful growth engine that's not going to slacken anytime soon. 

Next year, it plans to submit nine different data packets about its medicines' performance to regulators for their consideration. It'll also report pivotal data from 10 of its late-stage programs, each of which is an opportunity for its share price to rise on good news. In the long term, its ongoing efforts to diversify into making medical devices for aesthetic applications could pay off too.

But even if they don't, the company still has a massive number of different irons in the fire with its drug development efforts. That's why management expects to keep growing the top line by as much as 9% annually after 2024.

You may be wondering what will happen with AbbVie in 2023. The answer is that it'll likely be struggling, if only temporarily. Its psoriatic arthritis drug Humira, responsible for a sizable $5.5 billion of the company's $14.8 billion in third-quarter revenue, will lose its exclusivity protections next year, causing its market share to start evaporating rapidly.

That could drag the top line's growth into the negative and take its share price down a peg too, but only until its other immunology medicines like Skyrizi and Rinvoq replace the missing sales as they scale up into the same markets as Humira. And in the long term, there's no reason to suspect that growth will remain slow since more medicines will be developed, approved, and commercialized all the while.

Being consistently effective at drug development has its perks, like being able to pay a dividend. AbbVie's forward dividend yield is about 3.7%, and the company's dividend grown by 109% over the past five years. If the hikes continue -- and management has signaled that they will -- investors who buy shares today will build a larger and larger passive income stream without any further effort. 

Walgreens moves into providing healthcare directly

Walgreens' appeal to investors, its dividend, is entirely different than AbbVie's. That makes it a marginally better pick for passive income investors, but a weaker option for most other purposes. 

It's true that its forward yield above 5.5% is hefty, though the dividend's growth of 75% over the last 10 years isn't anything to write home about. Simply put, in recent years the company hasn't proven able to grow steadily. That should make investors a bit skeptical about its merits as an investment, especially when head-to-head against a powerhouse like AbbVie. 

Over the last five years, its quarterly revenue grew by only 5.5%, reaching $32.4 billion in its fiscal Q4 2022. But its quarterly net income shrank considerably in the same period, ending with a loss of $415 million. Worse yet, Walgreens' actions to shore up its sales, including its recent diversification into primary care via kiosks and mini-clinics in its pharmacies, won't have much of an effect for quite some time, if they ever do.

Its healthcare segment's sales soared by 75% in its 2022 fiscal year, but it only brought in $1.8 billion by Q4's close. Management is expecting the segment to scale up to between $11 billion to $12 billion per year by 2025, but even that won't be much compared to its total revenue of $132.7 billion.

So Walgreens isn't a growth stock. But it should be able to keep increasing its dividend, and people who invest to build a dividend cash flow will find that their money yields more with Walgreens in the short term than they'd be able to make with AbbVie. 

There's not much of a contest

Considering AbbVie's growth, upcoming catalysts from its pipeline, and faster pace of dividend hikes, it's a much better buy than Walgreens. True, AbbVie is exposed to risk from its clinical programs failing as income from Humira dries up. Still, management's plan -- doing more of the same drug development that it excels at -- is more likely to work out for investors than Walgreens' pivot into healthcare.

After all, Walgreens is just figuring out how to be a healthcare provider via its pharmacies for the first time, whereas AbbVie's success in commercializing new drugs goes back years.