When people think of CVS Health (CVS -0.98%), they probably think of the company's ubiquitous pharmacies, of which there are nearly 10,000 in the United States.

CVS was once part of the Melville Shoe Corporation, which began as a three-store chain in 1892. Just as CVS is no longer in the shoe business, the company has evolved into much more than a pharmacy business.

CVS said it made $256.7 billion last year, a 32% rise over 2018. Its biggest revenue driver is its pharmacy services group, which gets revenue from employers, insurance companies, and health plans. Basically, CVS uses its bargaining position to buy bulk drugs at a discount and then shares the savings with its clients.

Glass jar crammed with $100 bills.

Image source: Getty Images.

Last year, pharmacy services listed $141.5 billion for CVS. The company's retail/long-term care segment, which includes in-store pharmaceutical sales and other in-store retail sales, said it brought in $86.6 billion, while its healthcare benefits segment recorded $69.6 billion in revenue. That last area will likely grow, as 2018's $68 billion purchase of Aetna will contribute to its bottom line.

Good, but not great, growth

Revenue has grown at CVS every year since 2011, but does that mean investors in the company made money as well during that time?

The simple answer is yes, but not as much as they would have by investing in a simple S&P 500 index fund over the same period.

The company's share price has risen more than $11 a share since its March 16 low of $52.30, a 22% gain. But it hasn't bounced back as fast as the S&P, which has risen 32.8% in that same time frame.

The S&P 500's lowest point during the Great Recession was on March 9, 2009, when it closed at at $676.53. CVS closed at $23.98 that day. And as well as CVS stock may have done, the S&P 500 has outpaced it since the last recession. A $1,000 investment in CVS stock on March 9, 2009, would have bought you 41 shares. At Wednesday's closing price of $63.92, you would have $2,665.55 (before factoring in the company's dividends). That's a return of 167%, giving you a compound annual growth rate (CAGR) of 9.3%.

Assuming you reinvested CVS's dividends over that period, you would have $3,293.54, representing a return of 229% and a CAGR of 11%. An index fund that tracked the S&P 500 over that time, however, would have earned you $4,082.05, meaning a return of 301% with a CAGR of 13.5%.

If you compare CVS with its biggest competitor, Walgreens Boots Alliance (WBA 2.63%), however, CVS comes on top over that same period. Without the reinvestment of dividends, Walgreens's return over that period was 96% for a total of $1,963.72. With the reinvestment of dividends, a $1,000 investment in Walgreens on March 9, 2009, would give you $2,464.77 today. That's a return of 146%, compared with that $3,293.54 (229%) from CVS.

Ychart showing how CVS has done over the past 11 years compared to the S&P 500 and Walgreen's.

Image source: Ycharts.

CVS's first-quarter report shows diversity is paying off

CVS seems to be weathering the pandemic well. Its first-quarter report listed a total revenue gain of 8.3% through March 31, and adjusted operating income increased 14.4%. There were several reasons for that, including the fact that people stocked up on prescriptions and other medical supplies early in the pandemic. That helped the company's retail LTC division do well, though its healthcare benefits segment lagged because fewer people went to the doctor.

Once people do return to their regular doctor visits, there will be a rise in prescriptions that will further lift CVS. And increasingly, those doctors may be operating in one of the company's in-store MinuteClinics. CVS estimates that 80% of primary care needs can be handled at one of the company's 1,100 MinuteClinics.

The benefits of the MinuteClinics are obvious, and not just for CVS. Most people in the United States live within 10 minutes of a MinuteClinic, making them easier to get to than a typical doctor's office. Someone on vacation or on a work trip with an ear infection is going to have a difficult time getting an appointment with a regular physician, but MinuteClinics bridge that gap.

Overall, CVS has been a decent performer since the last recession, and there are several things that seem to be going right for the company. Healthcare investors may not find explosive growth in this stock, but its strong fundamentals make it worth considering for those who value safety in their portfolios.