(Reuters) - Amazon.com Inc AMZN.O on Thursday posted holiday quarter results well above expectations as the expansion of its one-day shipping program came under budget and membership in its Prime loyalty club notched a 50% rise in two years.

Shares soared as much as 13% in after-hours trade, putting the online retailer back in the $1 trillion market capitalization club. If the share gain holds on Friday, it will be the biggest daily jump for Amazon since October 2017.

Amazon also forecast operating income of up to $4.2 billion in the current quarter, down from $4.4 billion the year prior. Still, that appeared to assuage investor concerns about Amazon’s continued spending on fast delivery, which could have erased windfalls from e-commerce, advertising and cloud computing sales.

“We’re past the worst in terms of the margin pressure from the one-day shipping initiative,” said Atlantic Equities analyst James Cordwell. That and the “massively overstated” concerns about cloud competition rebutted some of the biggest arguments against buying the stock, he said.

Amazon Chief Financial Officer Brian Olsavsky told reporters that additional investment in one-day shipping came slightly under the $1.5 billion the company had forecast for the fourth quarter, despite more customer orders. Extra costs in the current period will be about $1 billion for the delivery effort, he said.

Olsavsky added that spending on video would rise going forward, but the company was still determining its overall level of investment for 2020.

Jeff Bezos, Amazon’s chief executive, said in a statement that the world’s biggest online retailer now has more than 150 million paid members in its loyalty club Prime, a 50% increase from its last disclosure in April 2018.

Subscribers keep returning to Amazon to benefit from perks like fast delivery, television and music streaming. Its suite of voice-controlled Echo speakers has prompted still more engagement from customers, and grocery orders more than doubled in the holiday quarter in a vote of confidence for Amazon’s 2017 bet to buy Whole Foods Market.

This formula has helped make Bezos the richest person in the world.

Amazon is hoping that cutting delivery times to one day for Prime members will let it outmaneuver rivals such as Walmart Inc WMT.N that have marketed two-day shipping without subscription fees. The company made progress in the holiday season, reporting that it quadrupled one-day and same-day deliveries over the year-ago quarter.

Revenue from subscription fees grew 32% to $5.2 billion for the quarter ended Dec. 31, Amazon said, as more shoppers signed up for Prime than in any period prior.

FILE PHOTO: The logo of Amazon is seen at the company logistics centre in Boves, France, August 8, 2018. REUTERS/Pascal Rossignol/File Photo

WATCHING CORONAVIRUS

Net sales rose 21% to $87.4 billion while net income rose 8% to $3.3 billion - each over $1 billion more than analysts had expected, according to IBES data from Refinitiv.

The profit rise reflects the evolving nature of Amazon’s business. The company has been moving away from low-margin retail toward a marketplace model where it takes lucrative fees for shipping and advertising the products of other merchants on its platform.

This has helped weather massive spending at Amazon, a company that has long passed up short-term results in favor of bets that could reap it future profit.

For instance, faster delivery has meant a surge in hiring and related costs. The company said its full-time and part-time headcount rose 23% to 798,000 in the quarter, as it expanded both fulfillment and corporate software roles.

Expenses similarly grew as the company moved inventory closer to customers and built out its last-mile delivery network, which now handles the biggest share of Amazon-ordered packages in the United States. Amazon said worldwide shipping costs rose 43% to $12.9 billion.

Amazon Web Services (AWS) also has seen infrastructure and marketing costs rise. The unit responsible for selling data storage and computing power in the cloud lost out to Microsoft Corp MSFT.O in a high-profile deal last quarter to sell technology to the U.S. Department of Defense, in what could have netted the company $10 billion over a decade. Amazon is contesting the contract decision.

Microsoft on Wednesday reported a 62% quarterly rise in sales for its Azure cloud computing service. Yet Amazon posted better results than feared, growing revenue 34% to $9.95 billion, similar to its third-quarter increase.

“This is important because it ends six quarters of measurable decline in AWS growth, reassuring investors that the segment has signs of stability,” Gene Munster, managing partner at Loup Ventures, said in a research note.

Amazon's international business also narrowed losses to $617 million in the fourth quarter. The company has less exposure to China than Apple Inc AAPL.O and other technology industry peers, which may help it weather economic uncertainty surrounding the outbreak of the coronavirus.

Olsavsky said Amazon is watching the situation very carefully and is starting to put China travel restrictions on employees. The company considers China to be a far less strategic market than India, which CEO Bezos visited earlier this month partly to announce a new $1 billion investment in the country.

(Graphic: Amazon shipping costs, )