Apple's iPhone business is alive and well.

The Cupertino, Calif.-based company reported selling 31.2 million iPhones in the June quarter, coming in well ahead of Wall Street estimates for about 26 million iPhones. iPad sales, on the other hand, were significantly weaker than expected: Apple reported selling 14.6 million, compared to estimates for sales of 17 million.

Overall, Apple reported earnings per share of $7.47 on revenue of $35.3 billion, coming in slightly ahead of estimates for earnings of $7.34 per share on revenue of $35.1 billion. That said, Apple's revenue was essentially flat year-over-year and profits were down from $9.32 per share a year earlier — the second consecutive quarter of year-over-year declines.

Apple's stock shot up by nearly 5% after the earnings report was released.

Expectations were low for the quarter largely because Apple issued lower-than-expected projections for its profit margins in the third quarter during its earnings call in April. Apple also did not release any major new products in the third quarter, nor did it release any new products in the quarter before that. It's now likely Apple will go close to a full year without a major product launch.

Apple's stock declined sharply in the months following the iPhone 5 launch due to supply concerns, executive shakeups, increased competition and a growing concern among investors that it might not have another breakthrough product in the pipeline. However, the stock price has remained relatively stable since the last earnings report three months ago, hovering between $400-$450 a share.

AAPL data by YCharts

Image: Mashable