On Tuesday, Feb. 11, CVS Caremark (CVS -1.07%) reported revenue and earnings per share for the fourth quarter of its 2013 fiscal year. In response to its earnings release, shares of the world's largest drugstore chain rose nearly 3%. However, after seeing this rise and considering that the company is significantly larger than both Walgreen (WBA -1.33%) and Rite Aid (RAD 24.00%), has the stock climbed too much or is there still room to run?

CVS impressed more on the top line than the bottom line
For the quarter, CVS reported revenue of $32.8 billion. This is slightly higher than the $32.7 billion that analysts forecast and nearly 5% above the $31.4 billion the company reported in the fourth quarter of its 2012 fiscal year. In the release, management announced that the rise in sales came about because of the addition of 52 new locations and an increase in comparable-store sales.

Compared to the same quarter a year earlier, CVS said that comparable-store sales for its pharmacy operations rose 6.8%. This was nearly double the 3.8% year-over-year increase in comparable-store sales the business reported for the fourth quarter of 2012. The driver behind this growth was a rise in the volume of prescriptions sold, which was negatively affected by the introduction of new generic drugs.

This rise in quarterly revenue allowed CVS to report a significant jump in its profitability. For the quarter, the business earned $1.05 per share, 17% higher than the $0.90 the company earned the same quarter a year ago but short of the $1.11 analysts anticipated. In addition to benefiting from higher revenue, the company's earnings per share rose because of a 4% reduction in the number of shares outstanding.

At face value, this looks nice, but it should be mentioned that CVS was, in part, negatively affected by rising costs. During the quarter, management reported that the cost of goods sold rose from 80% of sales to 80.7%, part of which was offset by operating expenses falling from 12.7% of sales to 12.6%.

But how does CVS stack up to its peers?
Despite seeing some positive performance during the quarter, it's difficult to say how strong of an investment prospect CVS really is. To get a better look at the big picture, the Foolish investor should look at how the company has performed over time.

Over the past four years, for instance, CVS has done quite well for itself. Between 2009 and 2012, management grew the company's revenue by 25% from $98.2 billion to $123.1 billion. In 2013, the business continued to grow, with sales coming in at $126.8 billion.

In terms of profitability, the picture hasn't been so clear. Between 2009 and 2012, CVS' net income rose less than 5% from $3.7 billion to $3.9 billion, as rising costs weighed on profitability. Fortunately, this trend ceased in 2013. The company reported a 19% jump in net income, as operating expenses stayed roughly even compared to where they stood a year earlier.

Just as in the case of CVS, Walgreen has seen a rise in both revenue and profitability, but the company's primary focus has been on maintaining strong margins as opposed to growing its top-line results. Over the past five years, Walgreen reported that its revenue rose 14% from $63.3 billion to $72.2 billion. Although the business was unable to keep up with CVS' growth, its rise in profitability was nearly on par. For the time frame, the business saw its net income jump 22% from $2 billion to nearly $2.5 billion.

Based on the performances of CVS and Walgreen, the Foolish investor might get the idea that Rite Aid has followed suit. But, upon looking at the company's financials over the past few years, you would be surprised. Between 2009 and 2013, Rite Aid actually saw its revenue decline more than 3% from $26.3 billion to $25.4 billion.

Unlike Walgreen and CVS, Rite Aid has been struggling with its profitability. It has refocused its efforts away from growth and toward improving its bottom line. Thankfully, this appears to be paying off, as demonstrated by Rite Aid's net income, which rose from a loss of $2.9 billion in 2009 to a gain of $118 million in 2013.

Foolish takeaway
Based on the evidence provided, it appears as though CVS had a decent quarter, but results could have been better. Yes, revenue did beat analysts' forecasts, but the rise in costs prevented the company from matching bottom-line expectations. Despite this less-than-ideal performance, CVS managed to grow quicker concerning both revenue and net income than either of its peers. For this reason, combined with the fact that it is the biggest fish in the industry, it's a company that the Foolish investor should consider analyzing further.