Apple delivered better than expected earnings results, giving the stock a little bump in after-hours trading. 

It sold 31.1 million iPhones, which was well ahead of analyst expectations of 26 million units sold.

On the earnings call, company executives attributed the strong iPhone number to accelerated iPhone 4 sales. 

The success of the iPhone 4 was reflected in the iPhone's average selling price, which dipped to $581 for the quarter. The iPhone 4 is the three year old iPhone that's sold at a discount. 

Despite the fall in the ASP, and the success of the iPhone, execs said the iPhone 5 remains the most popular iPhone by far. 

The other number of note was iPad units of 14.6 million, which was below expectations, and represented a 14% unit decline. Execs said that if you look at actually sell through on the product, discounting inventory issues, then iPad sales were down 3%. The decline was due to a lack of new iPad in the quarter. The year prior, Apple released the iPad 3, with a Retina display which drove sales. 

Overall, revenue was only up 1% for the quarter, and EPS was down 20% on a year-over-year basis. 

In the release, CEO Tim Cook said, "We are laser-focused and working hard on some amazing new products that we will introduce in the fall and across 2014."

Here's the key numbers versus expectations where appropriate:

Revenue: $35.3 billion versus $35.18 billion expected by sell-side analysts. Whisper was $37 billion. Apple's guidance was $34.5 billion (midpoint).

EPS: $7.47 versus $7.34 expected by sell-side analysts. 

iPhone units: 31.2 million versus 26 million expected by sell-side analysts. Whisper was 26.5 million.

iPad units: 14.6 million versus 18.3 million expected by sell-side analysts. Whisper was 18 million. 

Gross Margin: 36.9% versus 37% expected by sell-side, and it was the whisper number, too. Apple guided to 36.5% midpoint on margin for the quarter.

Mac units: 3.8 million versus 3.9 million expected by sell-side analysts, and it was the whisper number, too.

September quarter revenue: $34-$37 billion versus $37.9 billion expected by sell-side analysts. Whisper was $37 billion.

September quarter gross margin: 36%-37% versus 37% expected by sell-side analysts. 

iPhone ASP: $581, versus $613 last quarter.

Cash and securities: $146.6 billion


More from Business Insider