Some of the world's most successful businesses are those that consumers rely upon to deliver not only great products at great prices, but trustworthy advice, too.

In healthcare, pharmacies like CVS Caremark (CVS -0.65%), Walgreen Co. (WBA -1.18%), and Rite Aid (RAD -51.21%) are perfectly positioned to achieve these ends by offering consumers a convenient and credible source for filling prescriptions. Since the number of prescriptions filled is expected to grow significantly as the number of Americans age 65 years or older doubles, let's look at this industry and see whether these companies should be in Foolish portfolios.

Source: Walgreen.

What are pharmacies?
Pharmacies act as the go-between between drugmakers and patients and CVS Caremark, Walgreen, and Rite Aid are among the biggest pharmacy operators. These powerhouse retailers don't develop medicine themselves, but they do provide customers with a simple shopping experience that allows them to fill prescriptions quickly and cheaply.

While CVS, Walgreen, and Rite Aid pharmacies are common in every town and city block, other companies compete to fill prescriptions too. For example, hospitals are major healthcare providers and dispense prescriptions directly to their patients; pharmacy benefit managers like Express Scripts run insurer drug plans and offer mail order drug delivery; and large mass merchandise retailers such as Wal-Mart and Target, along with Kroger and other grocery chains, have also opened pharmacies within their stores too.

How do pharmacies work?
Historically, pharmacies were mostly independently owned and operated; however, rising real estate costs and salaries and stiff competition has shifted the market to favor large companies. As a result, thousands of Walgreen, CVS Caremark, and Rite Aid stores fill more than one-third of the nation's prescriptions. 

Pharmacies tend to make most of their money by filling prescriptions, but many also generate substantial revenue through selling general merchandise such as batteries and over-the-counter medicines

Although market share growth and a blurring of the lines between pharmacy benefit managers and pharmacies provides these companies with profit-friendly purchasing power, pharmacy operating margins remain in the mid-single digits.

Source: CVS Caremark

What's driving the pharmacy industry?
Doctor visits have the biggest impact on pharmacy demand and those visits are driven primarily by patient health, accessibility of care, and affordability of that care.

Since roughly 10,000 baby boomers are turning 65 every day through 2029, and demand for health care rises significantly as we age, prescription volume is expected to climb substantially over the coming decade. According to Rite Aid, the average person aged 65 to 74 years old fills nearly two times the number of prescriptions every year as those aged 45 years to 54 years old.

But it's not just ageing America that supports pharmacy sales. The Affordable Care Act is adding millions of previously uninsured patients to both private and public insurance plans and since these patients are visiting doctors more frequently, significantly more prescriptions are being written.

In order to boost market share, pharmacies are increasingly targeting older and newly insured patients by offering basic and chronic care treatment within in-store health care clinics. These clinics are oftentimes more convenient than primary-care practices and are cheaper than hospital ER and urgent care visits. As a result, these health care clinics are increasingly attractive to patients and the resulting patient volume growth is boosting pharmacy prescription demand and front-end sales. So far, CVS is the largest operator of these health care clinics with more than 800 locations, but Walgreen also operates hundreds of these clinics, and Rite Aid is starting to open them too.

While pharmacies are innovating to increase access and lower costs of care, they're also benefiting from the rising use of generic drugs. Pharmacies earn a higher margin on generics than they do on generic's branded counterparts; so with patents on billions of dollars' worth of branded drugs expiring every year, and generic drugs representing nearly 80% of all prescriptions filled, pharmacies should enjoy earnings tailwinds over the coming years.

Why invest in pharmacies?
Pharmacies are an important link in the healthcare chain. They fill prescriptions quickly and cheaply and are likely to see sales volume grow thanks to an older, longer-living population and reform-driven insurance enrollment. The trend toward low-cost generic drugs offers ongoing margin support; however, the industry continues to invest significantly into new services and programs, which reduces earnings. Having said that, investors willing to take the long view on pharmacies may find that they're rewarded as these companies expand to meet growing demand.