CHICAGO, IL - AUGUST 15: The Walmart logo is displayed on a shopping cart at a Walmart store on August 15, 2013 in Chicago, Illinois. Walmart, the world
PHOTO: Scott Olson/Getty Images
CHICAGO, IL - AUGUST 15: The Walmart logo is displayed on a shopping cart at a Walmart store on August 15, 2013 in Chicago, Illinois. Walmart, the world's largest retailer, reported a surprise decline in second-quarter same-store sales today. The retailer also cut its revenue and profit forecasts for the fiscal year. (Photo by Scott Olson/Getty Images)
Now playing
01:11
How Walmart is taking on Amazon
Now playing
00:54
See Nike's new 'hands-free' shoe
One of many large boxes of returned products that fill the warehouse. The returned products in this box will eventually be sorted and categorized.
PHOTO: John General/CNN
One of many large boxes of returned products that fill the warehouse. The returned products in this box will eventually be sorted and categorized.
Now playing
05:08
Here's where your 'free' online returns actually end up
PHOTO: Shutterstock
Now playing
04:42
Ever receive a package you didn't order? It could be a scam
PHOTO: Orangetheory Fitness
Now playing
02:13
This gym is actually opening studios during the pandemic
Now playing
02:24
How holiday spirit is surging despite the Covid-19 pandemic
NEW YORK, NEW YORK - NOVEMBER 19: A view of the window display as Macy
PHOTO: Eugene Gologursky/Getty Images North America/Getty Images for Macy's
NEW YORK, NEW YORK - NOVEMBER 19: A view of the window display as Macy's Herald Square unveils Give, Love, Believe 2020 Holiday Windows on November 19, 2020 in New York City. (Photo by Eugene Gologursky/Getty Images for Macy's)
Now playing
00:56
Macy's unveils holiday window display with gratitude theme
PHOTO: CNN/Target/Design by John General
Now playing
02:36
It's official: Black Friday is irrelevant
Now playing
02:23
Party City CEO: Consumers still want to celebrate together
NEW YORK, UNITED STATES - 2020/07/08: People wearing face masks shopping inside a retail store in Manhattan as the city enters phase 3 of reopening amid the coronavirus pandemic
As New York City enters phase 3 of reopening retail stores for indoor shopping, restaurants have been postponed for indoor dinning. The U.S. Department of Health recorded a total of 3,219,999 infections, 135,822 death and 1,426,428 recovered since the beginning of the outbreak. (Photo by Braulio Jatar/SOPA Images/LightRocket via Getty Images)
PHOTO: Braulio Jatar/SOPA Images/LightRocket/Getty Images
NEW YORK, UNITED STATES - 2020/07/08: People wearing face masks shopping inside a retail store in Manhattan as the city enters phase 3 of reopening amid the coronavirus pandemic As New York City enters phase 3 of reopening retail stores for indoor shopping, restaurants have been postponed for indoor dinning. The U.S. Department of Health recorded a total of 3,219,999 infections, 135,822 death and 1,426,428 recovered since the beginning of the outbreak. (Photo by Braulio Jatar/SOPA Images/LightRocket via Getty Images)
Now playing
01:38
US retail sales improved in September
PHOTO: thehouseofdrew.com
Now playing
02:01
Justin Bieber's footwear collaboration overwhelms site
PHOTO: Walmart
Now playing
01:01
See what's new inside Walmart stores
WHEATON, MARYLAND - APRIL 16: Customers wear face masks to prevent the spread of the novel coronavirus as they line up to enter a Costco Wholesale store April 16, 2020 in Wheaton, Maryland. Maryland Governor Larry Hogan ordered that all people must wear some kind of face mask to protect themselves and others from COVID-19 when on public transportation, grocery stores, retail establishments and other places where social distancing is not always possible. (Photo by Chip Somodevilla/Getty Images)
PHOTO: Chip Somodevilla/Getty Images
WHEATON, MARYLAND - APRIL 16: Customers wear face masks to prevent the spread of the novel coronavirus as they line up to enter a Costco Wholesale store April 16, 2020 in Wheaton, Maryland. Maryland Governor Larry Hogan ordered that all people must wear some kind of face mask to protect themselves and others from COVID-19 when on public transportation, grocery stores, retail establishments and other places where social distancing is not always possible. (Photo by Chip Somodevilla/Getty Images)
Now playing
02:32
How masks are reshaping the face of the retail economy
3119 E Third Street Dollar General in Dayton, OH on March 12, 2020.
PHOTO: Maddie McGarvey for CNN
3119 E Third Street Dollar General in Dayton, OH on March 12, 2020.
Now playing
06:07
Dollar General's business is booming. It's also vulnerable to crime, police say
Now playing
03:01
How private equity is gutting retail
Now playing
01:55
All retail bankruptcies are not the same. Here's what you need to know
(CNN Business) —  

Walmart’s all-important holiday sales blew past expectations, a sign the retailer can more than hold its ground against Amazon.

Sales at US stores open at least a year grew 4.2% over the holiday stretch compared with last year, including a 43% rise in digital sales. Walmart said its online sales got a boost from rolling out grocery pickup to stores across the country. It also expanded delivery to reach more shoppers.

Online sales increased quickly after Walmart added pickup and delivery to some stores and acquired new digital clothing brands like Eloquii and lingerie retailer Bare Necessities. More than 10% of Walmart shoppers used curbside pickup in January, according to research from analysts at Cowen.

Walmart’s stellar holiday shows that its recent moves to improve stores and expand online have worked. Walmart has focused its investments on offering its low-and-middle income shopping base cheaper and more convenient ways to buy groceries. It has also poured money into sprucing up stores and raising wages for workers.

At the same time, it has redesigned its website and bought several high-end brands— including Bonobos and Modcloth— to draw wealthier shoppers.

Low unemployment, rising wages, and a drop in gas prices also helped Walmart during the holidays. The government shutdown had a positive impact on Walmart’s earnings because February SNAP benefits were doled out early. That led to a 0.4% rise in sales, Walmart said.

The company also stocked up on toys to lure shoppers during the first holiday season in years without Toys “R” Us. Those efforts paid off.

Moving forward, Walmart will invest in growing online instead of opening up physical stores.

The company only plans to open 10 new stores this year. It already has more than 4,700 US stores, and more than 90% of the country lives within 10 miles of a Walmart.

Walmart plans to bring curbside pickup to around 1,000 more stores this year, but predicts that online sales growth will slow to 35%.

Walmart’s strong results should calm fears about a troubling report from the Commerce Department last week, which showed core retail sales plummeted 1.7% in December, the most in nearly two decades.

Wall Street shrugged off worries about new regulations in India. Walmart bought online retailer Flipkart for $16 billion a year ago.

Walmart’s (WMT) stock jumped 3% in early trading Tuesday.