America's battle with COVID-19 has done a real number on the economy, subtracting 32.9% from gross domestic product in the second quarter and costing as many as 40 million workers their jobs -- but not everyone is suffering equally.

Because of nearly nationwide stay-at-home orders and a trend toward increased social distancing that had many Americans choosing not to leave their homes even for groceries, e-commerce companies such as (AMZN -0.34%) were able to step up and provide essential services in such areas as grocery delivery and internet shopping -- and to grow their businesses nicely as a result.

Stock up arrow rising over 2020

Image source: Getty Images.

In the first quarter of 2020 alone, which caught only the tail end of the pandemic, Amazon grew its sales more than 26% year over year, accelerating from a 21% rate in the fourth quarter of 2019. In Q2, by which time the shopping trends under COVID-19 had become more clearly established, Amazon's sales surged 40% -- and profits just about doubled to $5.2 billion.

Such growth wasn't lost on investors. Amazon stock that entered this year at $2,040 and change closed at a mind-boggling $3,225 share price on Thursday afternoon, a gain of 58% since 2020 began. An investor who bought just $10,000 worth of Amazon stock in January (roughly five shares, and maybe a bit of a fractional share besides) would now be sitting on a $5,800 profit -- and would own Amazon stock worth $15,800.

Not bad for less than eight months of work.