NEW YORK — Amazon.com Inc. reported a surprise second-quarter profit on top of sales that beat analysts’ estimates, showing investors — as it has done before — that the Web retailer can make money when it puts the brakes on investments.
Shares in Amazon jumped as much as 19 percent after it reported Thursday that revenue rose 20 percent to $23.2 billion, helped by a fast-growing cloud-computing business and initiatives to attract more customers.
Net income was $92 million, or 19 cents a share. Analysts projected, on average, a loss of 14 cents on sales of $22.4 billion.
Jeff Bezos, the chief executive and founder, is pushing the Web retailer beyond sales of books, electronics, and household items as the company matures.
While Bezos has focused on pouring profits back into growing Amazon’s business, he has periodically pulled back on spending to show that Amazon can be profitable.
“They are showing investors that if they want to deliver profits, they can,” said Michael Pachter, an analyst at Wedbush Securities Inc., who has the equivalent of a buy rating on the stock. “Amazon is a dominant online retailer, well on its way to becoming one of the world’s largest retailers.”
Operating expenses grew slower than sales, rising 17 percent to $22.7 billion, Seattle-based Amazon said. Spending on marketing and fulfillment centers were both unchanged as a percentage of sales compared with a year earlier, according to Brian Olsavsky, Amazon’s chief financial officer.
Shares surged after the close of trading in New York, helping to push Amazon’s market capitalization to about $267 billion, more than Wal-Mart Stores Inc., the world’s largest retailer. The stock had earlier declined 1.3 percent to $482.18 at the close, leaving it up 55 percent this year.
Amazon is also investing to bring in more customers as competition intensifies. Walmart is rolling out a new membership service to challenge Amazon Prime, which offers two-day shipping, TV shows, photo storage, and other benefits for an annual fee.
Startup Jet.com Inc. officially debuted this week, following months of testing to give online deal-hunters an alternative to Amazon.
A day of sales on July 15 to mark Amazon’s 20th anniversary, which the company called Prime Day, exceeded expectations, Olsavsky said. The promotion, designed to drive Prime membership signups, featured reduced prices on television sets, lawn mowers, and other goods and helped to drive orders surpassing Black Friday, an annual US sales event that kicks off the year-end holiday shopping season.
Amazon’s cloud-computing division, which offers Web data storage and computing services and includes customers such as Pinterest Inc. and Netflix Inc., had sales of $1.82 billion, up 81 percent from a year earlier.
The Amazon Web Services Group reported a revenue gain of 49 percent in the first quarter. The cloud-computing effort has disrupted traditional technology companies as customers buy less hardware and software, instead renting computers from Amazon.
Amazon forecast third-quarter revenue of $23.3 billion to $25.5 billion, compared with analysts’ average projection of $23.9 billion.
“We’ve had competition for 20 years now from some of the biggest names in retail and other areas,” Olsavsky said on a call. “We’re used to competition, but we focus on the customer. ... We’re happy with the results.”