Image source: The Motley Fool.

Amazon (AMZN -1.35%) stock is truly on fire lately: Shares of the online retail giant have gained more than 50% over the last year, and they are currently trading near historical highs for the company, in the area of $775 per share. 

When something like this happens, investors typically wonder if this massive gain is based on solid fundamentals or exaggerated optimism and speculation. Let's take a look at five charts explaining the key reasons why Amazon stock is doing so well.

Booming revenue growth

Amazon is, first and foremost, a growth business, and the company is clearly delivering spectacular top-line performance. The e-commerce industry is fertile ground for growth, but Amazon is still doing much better than competitors such as eBay (EBAY -0.82%) in this area. The following chart shows revenue growth for Amazon and eBay over the last decade, and Amazon has downright obliterated eBay.

AMZN Revenue (TTM) Chart

AMZN Revenue (TTM) data by YCharts.

eBay was separated from PayPal via a spinoff in 2015, so this can make historical comparisons tricky. Nevertheless, looking at growth figures for the second quarter of 2016, eBay is still no match to Amazon. 

Amazon produced $30.4 billion in revenue last quarter, a strong increase of 31% versus $23.2 billion in the second quarter of 2015. As for eBay, the company generated $2.2 billion in sales during the period, a 6% increase year over year. Considering both revenue size and growth, Amazon doesn't leave much to be desired.

No saturation in sight

The North America retail division is Amazon's biggest and most mature segment, so what happens there can be crucial in terms of overall financial performance. Fortunately for investors, Amazon is still firing on all cylinders at home, with revenue growing 28% year over year, to $17.67 billion last quarter. This vigorous growth is indicating that Amazon is far from reaching any kind of market saturation point in the U.S., which bodes well in terms of growth opportunities going forward.

In addition, profit margins are increasing in North America, so operating income is outgrowing revenue in this segment. This has clear positive implications when it comes to company-level profit margins.

Image source: Amazon.

Leading the cloud computing revolution

Amazon is not only the top player in online retail on a global scale, but also the market leader in cloud computing infrastructure thanks to its Amazon Web Services division. This business is producing impressive performance for the company, both in terms of revenue and profitability.

Amazon Web Services revenue grew 58% to $2.89 billion during the second quarter of 2016. Operating income in this division was $718 million, representing an operating margin of 24.9% of sales. 

Image source: Amazon.

Management said in the earnings conference call that profit margins in cloud computing will fluctuate from quarter to quarter, but the company is benefiting from better utilization and cost efficiencies in this segment, which is the main driver behind increasing profit margins for Amazon Web Services in the past several quarters.

Increasing cash flows

Amazon is relentlessly focused on increasing free cash flows over the long term. The company believes that cash flows provide a more transparent measure of a company's financial health than accounting earnings, and management has been quite straightforward about this point of view since the beginning. 

From Amazon's first letter to shareholders in 1997: "When forced to choose between optimizing the appearance of our GAAP accounting and maximizing the present value of future cash flows, we'll take the cash flows."

Free cash flow is clearly expanding, the company produced $7.33 billion in free cash flow during the 12-month period ending in the second quarter of 2016, a 68% increase versus the year ended in the second quarter of 2015.

Image source: Amazon.

Amazon makes an intense use of capital leases to finance assets such as servers. Since those payments are not included in traditional free cash flow, the company also provides adjusted cash flow metrics for investors to evaluate how leases are affecting cash generation. 

One important metric in this area is "free cash flow less finance lease principal repayments and assets acquired under capital leases." This indicator shows free cash flows assuming that Amazon is purchasing those assets instead of leasing them, so financing strategy doesn't affect cash flow comparability.

Free cash flow less finance lease principal repayments and assets acquired under capital leases amounted to $2.5 billion during the year ended in June, a big improvement versus negative $492 million in the same period last year.

Image source: Amazon.

In a nutshell, Amazon is producing impressive growth, both in online retail and in cloud computing. In addition, profit margins are expanding, and different cash flow metrics are showing material improvements. With this in mind, it's not too hard to understand why Amazon stock is delivering spectacular returns for investors.