AMZN Chart

AMZN data by YCharts

What: Shares of Amazon.com (NASDAQ:AMZN) raced 23.5% higher in July, according to data from S&P Capital IQ. The stock was already up 10% by July 23, floating higher on analyst upgrades and new business ideas. But the stock really caught fire when Amazon reported second-quarter results on July 23, crushing both analyst estimates and its own guidance on both the top and bottom lines.

So what: Heading into the second quarter, the high end of Amazon's revenue guidance stopped at $22.8 billion and analysts would have settled for $22.4 billion. Instead, the e-commerce giant delivered sales of $23.2 billion. That surplus revenue trickled all the way down Amazon's income statement, resulting in $464 million of operating income and adjusted earnings of $0.19 per share. According to earlier guidance, operating income should have been no more than $50 million. Analysts only expected earnings near $0.14 per share.

Amazon shares opened 20% higher the next morning.

Although we don't believe in timing the market or panicking over market movements, we do like to keep an eye on big changes -- just in case they're material to our investing thesis.

Now what: In general, Amazon produces tons of cash but very limited bottom-line earnings. Currently, the company can look back at $4.4 billion of trailing free cash flows, up from $1.0 billion a year ago and leagues ahead of trailing GAAP earnings. In fact, despite this quarter's earnings surprise, Amazon has lost $188 million during the last four quarters in traditional earnings terms.

That's an extremely tax-efficient way to run a business, made possible by very large real estate holdings and other assets subject to depreciation over many years. The company only paid a total of $188 million in cash taxes across the last four quarters.

"We remain heads-down focused on driving a better customer experience through price, selection, and convenience," said Amazon CFO Brian Olsavsky in the second-quarter earnings call. "We believe putting customers first is the only reliable way to create lasting value for shareholders."

Judging by the final results, that strategy is working wonders.