Walmart, the largest retailer in the United States, said Thursday that strong holiday sales propelled its revenue to another annual record but flagged slower growth ahead, as shoppers face stubborn inflation, the uncertain impact of tariffs and a potential rise in unemployment.

Walmart, which brings in millions of customers each week, is a bellwether of U.S. consumer trends. Investors recoiled at the weaker-than-expected forecast, a rare loss of momentum for the company that has posted a series of bumper results. Markets tumbled Thursday with the S&P 500 down 0.4% for its first drop after setting all-time highs in each of the last two days. The Dow Jones Industrial Average lost 450 points, or 1%, and the Nasdaq composite sank 0.5%.

Walmart said sales rose to $681 billion in its latest fiscal year, which runs through January, a 5.1% increase from the year before. The retailer’s annual profit jumped faster than sales, to around $20 billion.

The crucial holiday shopping season was a strong one for the retailer, with more people visiting stores and shopping online last quarter, and spending more on each visit. E-commerce sales in the United States jumped 20%.

But looking ahead, the company said that it expected revenue to increase only 3% to 4% this year. That was a little lighter than analysts expected, and Walmart’s stock dropped more than 6%, erasing tens of billions of dollars in market value.

“Our outlook assumes a relatively stable macroeconomic environment, but acknowledges that there are still uncertainties related to consumer behavior and global economic and geopolitical conditions,” John David Rainey, Walmart’s chief financial officer, said on a call with analysts.

“The company had a very strong 2024, and the company has had a number of very strong years since the onset of the pandemic,” said David Silverman, a retail analyst at Fitch Ratings. “It’s just mathematically a challenge to maintain these levels of growth.”

For a sense of scale, Walmart’s revenue grew by about $32 billion last year, or the equivalent of Dollar Tree’s entire annual revenue.

As Walmart has said for the past few years, higher-income shoppers, whom the retailer defines as those making more than $100,000, helped it gain market share. These consumers are better able to absorb higher prices, as inflation has recently ticked up. Walmart called out soaring egg prices as a major factor pushing prices higher in recent months.

“The biggest challenge on the horizon for Walmart and everybody else is how the tariffs picture clears up,” said Sheraz Mian, director of research at Zacks Investment Research.

Walmart said its forecast did not account for the effects of tariffs. “Tariffs are something we’ve managed for many years, and we’ll just continue to manage that,” McMillon said on the call. “We can’t predict what will happen in the future, but we can manage it really well, and we’re wired to try and save people money, so that’ll be our ultimate goal.”