Online grocery is already a $20 billion industry in the United States, but that number could almost double within the next four years. Sales of food and beverages through digital channels will reach $38 billion in 2023, according to eMarketer. The analysts still say grocery "will remain one of the least-penetrated e-commerce categories for the foreseeable future."

With total U.S. grocery sales of $667 billion over the past 12 months, it's clear there's a lot of room for online grocery sales to grow. But also comparing online grocery sales in the U.S. to other markets, looking at which consumers are making digital grocery purchases, and looking at what the major retailers like Walmart (WMT -1.75%) and Amazon.com (AMZN 1.30%) are doing in the space, shows there's still a long way to go for U.S. online grocery sales.

A brown paper bag full of groceries spilling out on a wood table.

Image source: Getty Images.

Under-indexing the rest of the world

Online grocery sales are just a small fraction of total grocery sales in the U.S., but they're also a relatively small portion of total online sales. Groceries account for just 1.6% of online sales in the U.S., according to data from grocery research firm IGD. By comparison, South Korea, Japan, and the UK have online grocery sales that account for 8.3%, 7.1%, and 6% of all digital sales, respectively.

The analysts expect strong online grocery sales in the U.S. to push the categories' percentage of digital sales to 3.5% by 2023. Still, the U.S. will lag well behind the other markets in the company's study.

One of the big challenges in the United States compared with countries such as South Korea, Japan, and the UK is that the population is much more spread out. In Japan, nearly half the population lives in two metropolitan areas -- Tokyo and the Kyoto-Osaka-Kobe region. The more spread-out population in the United States makes it harder to reach a high percentage of consumers.

That challenge isn't stopping Walmart. The big-box retailer is using its physical footprint to reach new online grocery shoppers. The company expects to offer online grocery pickup service to 80% of the population by the end of the year. Fifty percent of the population will be able to order groceries for delivery.

Who orders groceries online?

It shouldn't be a big surprise that online grocery shoppers skew younger. Fifty-five percent of shoppers aged 25 to 34 said they're very or somewhat likely to purchase groceries online, according to research from market researcher IRI, as cited by eMarketer. That number falls to 45% for 35- to 44-year-olds and 35% for 45- to 55-year-olds.

Interestingly, 38% of 25- to 34-year-olds purchased groceries online in the UK last year, but 48% of 35- to 44-year-olds made online grocery purchases as well. That indicates it's not just young millennials who might value the convenience of online grocery shopping. It makes sense for younger parents with potentially busy schedules as well.

When online grocery outlets start winning over a greater percentage of that slightly older demographic, they'll see sales increase considerably.

How companies are working to win over consumers

There are two main focuses in the online grocery space: curbside pickup and same-day delivery.

Walmart is leading the charge in both regards, and it's made considerable progress in the space over the last two years. As mentioned, it plans to cover 80% of the population with in-store pickup and 50% with same-day delivery by the end of the year. As a result, Walmart's expected to surpass Amazon's online grocery sales this year.

Unlike other big grocers, Walmart isn't charging a service fee for curbside grocery pickup orders. It's afforded that capability for a couple of reasons. First, it has greater scale than any other grocer in the United States. That scale allows it to spread out the fixed costs of offering curbside pickup.

Second, Walmart's online grocery service brings in new customers who are buying some higher-margin items along with groceries for curbside pickup. Other grocers don't sell as wide of a variety of products as Walmart, so they can't balance out low-margin grocery sales with higher-margin items.

Amazon isn't standing still, however. It's investing heavily in building out its fulfillment network to support one-day shipping for its Prime members on millions of items. It's already built out the capabilities to ship 10 million items in one day in the contiguous 48 states. Prime members in select cities also have access to millions of items for free same-day delivery. That includes grocery delivery from Whole Foods in nearly 90 metro areas. Those numbers are expanding every year as Amazon invests in its fulfillment network.

As Walmart and Amazon make online grocery shopping cheaper and more convenient for a growing share of consumers, they should be able to grow the industry and take market share from early online grocery delivery services. That's important for both companies, because over half of Walmart's total sales come from groceries, and Amazon has spent billions of dollars on its grocery business. Investors should see strong progress over the next few years and continuing through the next decade.