Competitors are starting to show progress in cutting into Amazon's (NASDAQ:AMZN) massive lead in e-commerce.

Walmart (NYSE:WMT) and Target (NYSE:TGT) reported blowout second-quarter earnings results with surging e-commerce sales. Walmart's online sales increased 97% while Target said its digital sales climbed 195% over the last three months. Costco (NASDAQ:COST) hasn't reported its earnings results yet, but it posted monthly e-commerce sales growth of 106%, 86%, and 75% in May, June, and July, respectively. Shopify, which counts hundreds of thousands of small merchants on its e-commerce platform, said its gross merchandise volume increased 119% last quarter.

Amazon, meanwhile, reported sales growth of "just" 48% for its online stores in the second quarter. When looking at its results by region, North America grew 43%. Its third-party seller services grew a bit faster at 52%.

With slower growth than its competitors, Amazon must be losing significant market share. But estimates from the U.S. Census Bureau suggest it might not be that bad for the market leader. E-commerce sales in the country grew 44.5% year over year last quarter, according to government estimates. That's only slightly faster than Amazon's North American sales growth during the same period and slower than its third-party seller services.

A truck with the Amazon Prime logo on the trailer.

Image source: Amazon.

Amazon's keeping good pace with the market

Amazon did a good job of keeping pace with the overall market in the second quarter. And that was a quarter where Amazon's fulfillment network was thrown into upheaval. 

It moved to prioritize fulfillment on items it deemed essential and asked merchants to halt shipments on nonessential inventory to its warehouses as it dedicated its footprint to essential goods. Meanwhile, operations at its warehouses were slowed after it took measures to help prevent the spread of COVID-19. Even Amazon's valued Prime members saw long delays for some shipments.

Amazon also pulled back on advertising and internal promotional efforts typically used to boost sales. And it had to delay its Prime Day shopping holiday, typically scheduled in July, as it worked to get its warehouses back up to speed.

Amazon doesn't report gross merchandise volume, and it doesn't break out its sales results by country. Therefore, it's impossible to know whether it grew faster or slower than the overall market based on publicly available data. But it seems like Amazon grew slightly slower than the overall market in the U.S.

When a company commands a near-40% market share, though, growing slightly slower than the rest of the market means there's a good amount of market share gains to be had. Even if Amazon grew about 10% slower than the overall market (say about 40% GMV growth), it'd open up around 1.2 percentage points of market share. And for competitors with around just 1% of the total market like Target or Costco, that's a huge opportunity to take share. Even Walmart, with a market share of around 5%, had a lot to gain.

Amazon should outperform other online retailers in the second half of the year

Importantly, investors should consider Amazon has mostly recovered from the shock of COVID-19. It's ramping up its warehouse capacity, starting to spend on advertising again, and it's planning for a Prime Day in October. All signs point to sustained demand for Amazon shipments and elevated revenue growth through the end of the year.

Meanwhile, there are indications Walmart's sales growth may fall back down a notch. The company reported comparable-store sales growth of 4% in July compared to 9.3% for the full quarter. Online sales are a key contributor to comparable-store sales. Management cited uncertainty about consumer spending after stimulus checks run out, as well as an abnormal back-to-school shopping season.

While Amazon might have lost a little bit of its dominant share of e-commerce (maybe), it looks more like a short blip on its steady march to a greater and greater share of online retail.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.