Apple today announced fiscal third quarter 2013 earnings of $35.3 billion in revenue, $6.9 billion in profit and $7.47 earnings per diluted share, beating expectations with the help of strong iPhone sales of 31.2 million units. Analysts had expected revenue of $35.01 billion and $7.32 in earnings per share.

Investors have been keeping a close watch on iPhone demand in recent months, as rumors had suggested that sales were down. Apple stock has fallen over 20 percent year-to-date. During after-hours trading on Tuesday, shares were up 5 percent.

Apple’s iPhone sales, a record for the June quarter, were up 20 percent year over year, but the iPad didn’t fare as well. Only 14.6 million iPads were sold during Q3 2013, a drop of 14 percent compared to the 17 million units it sold in the year ago quarter. The firm also reported a 7 percent year-over-year drop in Mac sales to 3.75 million. iPods slid 32 percent from a year ago to 4.57 million.

“We are especially proud of our record June quarter iPhone sales of over 31 million and the strong growth in revenue from iTunes, Software and Services,” Apple CEO Tim Cook said in a statement. “We are really excited about the upcoming releases of iOS 7 and OS X Mavericks, and we are laser-focused and working hard on some amazing new products that we will introduce in the fall and across 2014.”

Apple did see a sequential drop in revenue across all geographies outside the US. Greater China revenue in particular was effected, dropping 43 percent.

Guidance for the fiscal fourth quarter came in at between $34 billion and $37 billion in revenue with a gross margin of between 36 percent and 37 percent.

Apple announced a dividend of $3.05 per share that will be payed on August 15th.

In the year ago quarter, Apple reported $35 billion in revenue and $8.8 billion in profit with 26 million iPhones and 17 million iPads sold. Those numbers came in as a rare miss of analyst estimates, though the company did beat its own estimates.

In the second fiscal quarter of 2013, Apple posted $43.6 billion in revenue and $9.5 billion profit. It sold 37.4 million iPhones and 19.5 million iPads during the previous period, while Mac and iPod sales dropped 2 percent and 27 percent year-over-year, respectively.

Image credit: iStockphoto