Whole Foods' ( WFMI) second-quarter sales didn't meet the company's expectations, but they were still good enough to help the company post a 21% gain in earnings per share, the specialty grocery chain reported on Wednesday.

In its quarter ended April 13, Whole Foods earned $25.6 million, or 41 cents a share. That was up from the year-ago period, when the Austin, Texas-based company earned $20.2 million, or 34 cents a share.

Over the same period, Whole Foods' sales jumped 16% to $725.1 million. On a same-store basis, which compares results at outlets open for more than one year, Whole Foods' sales increased 7%. The company had projected same-store sales growth of 8% to 9% in the quarter.

The company's bottom-line results met Wall Street earnings expectations of 41 cents a share, according to Thomson First Call.

Whole Foods maintained its previous guidance of full-year earnings of $1.62 to $1.69 a share, but said it now expects results to come in toward the low end of that range. The company expects to post earnings of 41 cents to 42 cents a share in the third quarter.