Captura De Pantalla

Source: Amazon.

Amazon (NASDAQ:AMZN) stock was rising by an explosive 17% on Thursday after the close, as the company announced rock-solid financial figures for the second quarter of 2015. Performance was healthy across the board, with both sales and earnings coming in well ahead of expectations. In addition, Amazon's cloud computing business is truly on fire.

The big numbers
Net sales during the second quarter of 2015 increased 20%, to $23.18 billion. The number was better than the $22.39 billion forecasted by Wall Street analysts. The company's guidance was for sales in the in the range of $20.6 billion to $22.8 billion, so top-line growth was also materially above Amazon's own expectations.

Excluding the $1.39 billion unfavorable impact from foreign exchange fluctuations, net sales increased 27% compared to the second quarter of 2014. This growth rate is nothing short of impressive considering the company's size, and it even represents an acceleration versus previous quarters. As a reference, sales in the first quarter of 2015 grew 15% in U.S. dollars, and 22% in currency adjusted terms.

Cash flows are growing even more rapidly than sales. Operating cash flow increased 69%, to $8.98 billion, during the trailing 12-month period ended in June, 2015, while free cash flow increased to $4.37 billion versus only $1.04 billion for the same period last year.

Gross margin expanded to 35% of revenue from 31% of sales in the second quarter of 2014. In addition, operating expenses increased only 17% year over year, materially below the rate of expansion in sales. This allowed Amazon to deliver an operating gain of $464 million, crushing its own guidance for operating results in the range of a $500 million loss, and a $50 million operating gain.

Wall Street analysts were, on average, forecasting a net loss of $0.14 per share, and Amazon downright obliterated those forecasts with a net gain of $0.19 per share.

Why Amazon stock is soaring
There's plenty to like in Amazon's latest earnings report. To begin with, growth rates remain quite impressive. Even Amazon's online retail division in North America, it's most-mature market, showed a 26% increase in the last quarter, an acceleration in growth versus a 25% year-over-year increase in the same quarter last year. Sales of electronics and other general merchandise in North America jumped by a remarkable 31% versus the second quarter in 2014.

Cash flows are notoriously strong, and Amazon is delivering expanding profit margins as revenues are outgrowing expenses. Investors and Wall Street analysts have long criticized Amazon for its razor thin profitability, so the company could be debunking one of the strongest bear arguments, as margins are moving in the right direction.

Importantly, results from Amazon Web Services are off the charts. This was the second quarter in which Amazon announced performance in this key growth segment, and the numbers don't leave much to be desired. Amazon Web Services produced $1.82 billion in revenue, a staggering growth rate of 81% from $1 billion in the second quarter of 2014.

Profit margins in cloud computing look quite encouraging, too. Amazon reported an operating income of $391 million during the quarter, an increase of more than 400% from 77 million in the same quarter last year. As a percentage of sales, operating margin from Amazon Web Services jumped to 21% from 8% in the second quarter of 2014.

To wrap up, growth rates remain remarkably strong, with revenue growth even accelerating in key segments. Profit margins are also improving, and Amazon surprised Wall Street with an unexpected profit during the quarter. Amazon Web Services was another strong spot, delivering spectacular growth in both revenue and operating profit. It's really no wonder why Amazon stock is up sharply after the latest earnings report.

Andres Cardenal owns shares of Amazon.com. The Motley Fool recommends Amazon.com. The Motley Fool owns shares of Amazon.com. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.