After weeks of anxiety among investors over Apple Inc.'s fiscal second-quarter results, the company delivered a one-two punch of good news Wednesday that sent its stock soaring.

First, Apple posted revenue for the three months ending in March that beat both Wall Street's projections and its own guidance. And second, the company said it was expanding its record stock buyback and dividend plan to $130 billion from $105 billion.

"We are announcing a significant increase to our capital return program," Apple Chief Executive Tim Cook said in a statement. "We're confident in Apple's future and see tremendous value in Apple's stock."

The news may not squelch the bigger question of whether the company can deliver any new, innovative blockbuster products under Cook. But for the moment, the latest developments at least will relieve some of the more immediate fears investors had about the company's near-term performance.

Three months ago, when Apple offered guidance of $42 billion to $44 billion for second-quarter revenue, it raised the prospect that it could have the first year-over-year decline in revenue in more than a decade.

Instead, the company reported quarterly revenue of $45.6 billion, well above the analysts' consensus of $43.62 billion, and up from the $43.6 billion the company posted in the year-earlier quarter.

"We're very proud of our quarterly results, especially our strong iPhone sales and record revenue from services," Cook said in a statement. "We're eagerly looking forward to introducing more new products and services that only Apple could bring to market."

Apple reported profit of $10.2 billion, or $11.62 a diluted share, compared with $9.5 billion, or $10.09 a share, for the same quarter a year ago. Wall Street analysts had expected $10.22 a share.

Operating margin was 39.3%, up from 37.5% in the same period last year, which will no doubt cheer investors.

Apple sold 37.43 million iPhones in its fiscal second quarter last year and analysts had projected the company to sell 37.97 million in the same period this year. The company blew past that by selling 43.7 million iPhones in the second quarter of 2014.

But that surprise was somewhat offset by a steep decline in iPad sales.

The company sold 19.48 million iPads in the fiscal second quarter a year ago and analysts had expected that to fall to 19.38 million this year. Instead, the company said it sold only 16.35 million iPads.

On the shareholder program, Apple's board increased money for share repurchases to $90 billion from $60 billion. Most of the remaining $130 billion will go to dividend payments.

Apple's stocked closed Wednesday at $524.75, down $6.95 or 1.31%, before earnings were released. After the report, Apple's stock rose $37.89 per share, or 7.22%, to $562.64.