CVS Caremark Corporation's (NYSE:CVS) second-quarter profit soared past analysts' expectations at $1.12 billion, up from $955 million a year earlier, as its pharmacy benefit business outgrew its drugstores.

The Rhode Island chain said it earned 4 cents a share in the quarter, compared to a penny a year ago.

Adjusted earnings per share rose to 97 cents from 81 cents, topping the average estimate of 96 cents, according to analysts polled by Thomson Reuters.

Revenue was up 1.7 percent to $31.25.

CVS' operating profit spiked 32 percent in its pharmacy benefits management business, while the drugstore chain's retail division rose only 9 percent.

Continue Reading Below

The company agreed to pay a $20 million civil penalty on Friday to end a Securities and Exchange Commission investigation into charges of improper accounting for an acquisition.

Shares in the company fell 1.4 percent to $60.70 at 9:30 a.m. on Tuesday.