Amazon.com (NASDAQ:AMZN) reported powerful second-quarter 2020 results after the market close on Thursday. Shares are up 4.8% in Thursday's after-hours trading session, as of 5:27 p.m. EDT.

We can attribute the market's delight to the global e-commerce and cloud computing leader's trouncing of Wall Street consensus estimates on both the top and bottom lines. Its third-quarter revenue guidance also exceeded analysts' expectations. Here's an overview of the tech-giant's quarter, along with its guidance.

An Amazon tractor-trailer with Prime on side of trailer.

Image source: Amazon.

1. Revenue surged 40%

Amazon's net quarterly sales surged 40% year over year to $88.9 billion, easily beating the $81.5 billion Wall Street had expected. The company sailed by its guidance range of $75 billion to $81 billion. Excluding the negative impact from foreign-currency exchange, revenue climbed 41%.

For context, in the first quarter, Amazon's revenue rose 26% year over year (27% in constant currency) to $75.5 billion.

Here's how revenue broke out by segment:

Segment

Revenue for Q2 2020

Change (YOY)

North America

$55.4 billion

43%

International

$22.7 billion

38%

Amazon Web Services (AWS)

$10.8 billion

29%

Total

$88.9 billion

40%

Data source: Amazon. YOY = year over year.

The company's e-commerce business, particularly in North America, benefited from a brisk tailwind from the COVID-19 pandemic.

2. Operating income soared 89%

Operating income increased 89% year over year to $5.8 billion, which crushed Amazon's guidance of an operating loss of $1.5 billion to an operating gain of $1.5 billion. This was an especially impressive feat considering the company incurred over $4 billion of incremental costs related to COVID-19, as essentially planned. (It had guided for "approximately $4 billion" of incremental costs related to the pandemic.) 

Segment

Operating Income for Q2 2020

Change (YOY)

North America

$2.1 billion

37%

International

$345 million

N/A. Improved $946 million from a loss of $601 million in the year-ago period.

AWS

$3.4 billion

58%

Total

$5.8 billion

89%

Data source: Amazon. YOY = year over year.

All three segments performed well, with cloud computing service AWS having a particularly profitable quarter. The pandemic has driven a surge in internet traffic because many more people than usual have been working from home and otherwise staying there. This phenomenon has been a tailwind for cloud service companies.

While North America performed very well considering the pandemic, its operating income performance wasn't as robust as the 37% year-over-year growth figure might suggest. The segment's year-ago operating income was significantly dented by Amazon's spending on upgrading its core Prime free-delivery benefit from two days to one. 

3. EPS rocketed 97%

Net income doubled year over year to $5.2 billion. This translated to earnings per share (EPS) growing 97% to $10.30. Wall Street was looking for EPS of $1.46, so Amazon's result crushed that expectation. 

4. Operating cash flow rose 42% over the trailing-12-month period

Operating cash flow jumped 42% year over year to $51.2 billion for the trailing 12 months. Free cash flow increased 28% to $31.9 billion.

5. Revenue is expected to grow 24% to 33% in Q3 

For the third quarter, Amazon guided for net sales between $87 billion and $93 billion, representing growth of 24% to 33% year over year. This outlook exceeded the Wall Street estimate of $86.3 billion.

The company expects operating income between $2 billion and $5 billion, compared with $3.2 billion in the year-ago period. This guidance assumes more than $2 billion of costs related to COVID-19.

In short, Amazon turned in a fantastic quarter.