What a difference a year can make. This time last year, Apple’s stock was dancing in the mid-$500 range about to make an explosive run to a record high in late September. Then it all came tumbling down. Apple shares have lost more than 40% of their value since topping $705 last fall, and there are still no signs of a rebound in sight. Things took a sharper turn south in the new year and the stock is down about 23% year-to-date, recently dropping below $400 for the first time since December 2011. Shares rose on Tuesday as investors geared up for Apple to report its fiscal second-quarter earnings, and the numbers are now in.

According to FactSet, analysts were expecting Apple to post a profit of $9.97 per share on $42.28 billion in revenue and Apple beat the Street’s consensus as it reported earnings of $10.09 per share on revenues totaling $43.6 billion. Apple’s own guidance called for revenue to fall between $41 billion and $43 billion.

In the same quarter last year, Apple earned $12.30 per share on $39.2 billion in sales.

“We are pleased to report record March quarter revenue thanks to continued strong performance of iPhone and iPad,” said Tim Cook, Apple’s CEO. “Our teams are hard at work on some amazing new hardware, software and services, and we are very excited about the products in our pipeline.”

Where Apple’s biggest money-maker is concerned, consensus estimates suggested the company would sell 36.5 million iPhones in the second fiscal quarter and Apple beat expectations there as well, having sold 37.4 million iPhones between January and March.

IPad sales were expected to come in at 18.3 million and Apple reported actual sales of 19.5 million iPads for Q2. Mac sales missed the 4.1 million unit consensus as Apple noted combined sales of 3.95 million units across its laptop and desktop computer lines.

Apple said it had $145 billion in cash at the end of the second fiscal quarter and the company plans to boost its stock buyback program by $55 billion to $100 billion. “This is the largest single share repurchase authorization in history and is expected to be executed by the end of calendar 2015,” the company said. Apple said it will borrow money to help finance the new buyback program, though it did not reveal specifics. The company also announced it will increase its quarterly dividend by 15% to $3.05 per common share.

For the third fiscal quarter, Apple said it expects revenue to fall between $33.5 billion and $35.5 billion, missing Wall Street’s $38.5 billion consensus.

Apple shares climbed more than 4.5% in after-hours trading on Tuesday following the company’s earnings report.