Chief Executive Officer Larry Merlo said in a statement that the arrival of new generic drugs, which generate lower revenue but higher profits than branded medicines, was the key factor in the earnings growth.
Shares of CVS Caremark Corp. (CVS) were up 0.6 percent at $58.50 in trading before the market opened.
CVS said net income rose to $956 million, or 77 cents a share, from $776 million, or 59 cents a share, a year earlier.
CVS, which operates a chain of drugstores and has a pharmacy benefits management business, reported a profit of 83 cents a share from continuing operations, excluding special items. That was 4 cents more than what Wall Street was expecting, according to Thomson Reuters I/B/E/S.
It was also 3 cents higher than the top of CVS' own forecast range.
Still, CVS didn't raise the upper limit of its earlier 2013 earnings forecast from $4 a share. It cited the across-the-board federal spending cuts known as sequestration, which have led to less spending on drugs for the U.S. government's Medicare program for older people.
CVS did increase the lower end of the profit outlook to $3.89 a share from $3.86. Wall Street was expecting $3.97 for the full year.
Revenue in the pharmacy benefits management unit, which administers drug benefits for employers and health plans and runs a large mail order pharmacy, rose just 0.1 percent to $18.31 billion. But its gross profit margin increased 1.2 percentage points to 4.2 percent of sales.
Generic drugs lifted profitability at CVS' retail business, where gross profit was 30.9 percent of sales, up 2.4 points. Revenue in the retail division rose 0.2 percent to $10.05 billion, while same-store sales of general merchandise items were up 1.2 percent.
Overall revenue slipped 0.1 percent to $30.76 billion, but exceeded the $30.36 billion that Wall Street expected, according to Thomson Reuters I/B/E/S.