If you are looking for investment ideas then you may want to consider pharmacy retailer and benefit manager CVS Caremark (CVS 0.10%) and pharmacy retailer Walgreen (WBA -0.06%). Selling prescriptions and providing related services and merchandise represent important and necessary functions in society. However, appearances can be deceiving, so it always pays to do your research to see if the companies you want to invest in can grow their revenue and cash flow and retain some of it for reinvestment into the business.

Source: Motley Fool Flickr by Michael Carter

More than just a retailer
CVS Caremark not only sells medicine, general merchandise, food, and beverage through its 7,600 retail pharmacy locations, it also provides related services through its pharmacy benefit management segment such as mail order prescriptions, designing pharmacy plans, and specialized pharmacy.  CVS Caremark enjoyed excellent fundamental expansion over the past five years with revenue, net income, and free cash flow growing 38%, 44%, and 170% respectively. Similarly, in the most recent quarter revenue, net income, and free cash flow grew 6%, 18%,  and 35%respectively.

CVS Caremark offered a number of reasons for its recent increase in revenue including the acquisition of Coram (a provider of home infusion and specialty pharmaceutical services), specialty pharmacy growth, new products, new clients, slowdown in generic drug sales, new store growth and same store sales growth.It's preferable to see a company internally generate growth as indicated here (with the exception of the acquisition of Coram).

Higher margins stemming from beneficial generic drug rates  and sales growth leverage contributed to CVS Caremark's recent increase in net income. The timing of receipts from customers and the net income expansion contributed to the rise in free cash flow.

CVS Caremark's cash and short term investment balance of $2.8 billion clocked in at 7% of stockholder's equity last quarter. Its long-term debt to equity ratio registered at 34% of stockholder's equity.  Long-term debt to equity of 50% or less is preferable. Low debt means less interest to choke out profitability and cash flow.

CVS Caremark pays out a frugal 24%of its earnings in dividends. Currently the company pays its shareholders $1.10 per share per year yielding 1.4% annually.

Source: Motley Fool Flickr by Eileen Rojas

What about Walgreen?
As of the most recent quarter Walgreen operated 8,681 locations that included its drugstores, wellness centers, infusion and respiratory services, specialty pharmacies, and mail service centers. Walgreen grew its revenue, net income, and free cash flow 19%, 36%, and 48% respectively over the past five years.  More recently,  Walgreen grew its year to date revenue and net income 5% and 24%  respectively; however, its free cash flow declined 47%during that time.

Comparable store sales, front-end sales and prescription sales contributed to the recent gains in revenue.  Moreover, higher equity earnings from its Alliance Boots investments , along with lower labor and marketing expenses contributed to Walgreen's net income expansion . Unfavorable working capital  and higher capital expenditures contributed to the decline in free cash flow.

Walgreen possesses a good balance sheet with cash and long-term debt to equity during the most recent quarter coming in at 9% and 22% respectively.  Walgreen currently pays out 41%of its earnings in dividends. Currently Walgreen pays its shareholders $1.26 per share per year and yields 1.9%.

Now what?
Both of these companies operate in a needed crucial industry in our society, and both companies possess balance sheets without a great deal of leverage. However, CVS Caremark represents the better investment. It offers complete ownership of a pharmacy benefit manager providing its shareholders with product depth and diversity.

CVS Caremark also came out ahead on Walgreen's fallout  with its contracted benefits manager. In addition CVS Caremark sported a higher growth rate over the past five years. CVS Caremark trades at 20 times earnings right above the S&P 500's P/E ratio of 19 meaning it's slightly overvalued.However, CVS Caremark definitely deserves a second look.