Americans might say they’re upset about rising prices and losing confidence in the economy, but that hasn’t stopped them from snapping up cars, electronics, fitness equipment and other big-ticket items.

Retail sales jumped 1.7 percent in October, the Commerce Department reported Tuesday — a significant acceleration from September levels even as new data put consumer confidence at a 10-year low. Walmart and Home Depot clearly benefited from the surge, with both retail behemoths reporting robust third-quarter sales and profits.

The data highlights a unique economic moment where the country is still in the grip of a pandemic, but the coronavirus and fears surrounding it have receded enough for economic activity to maintain a brisk pace. Even so, the composition of spending remains heavily weighted toward goods instead of services in the run-up to the holidays.

And though consumers are grumbling about the rising cost of gas, groceries and other everyday goods, they have so far been willing to accept them, said Mark Cohen, director of retail sales at Columbia Business School.

“The fact is, the world shut down for the better part of 2020 and people have savings because they haven’t been out and about,” he said. “They have a lot of disposable cash — and now that things are coming back to normal, they’re going to dispose of it.”

All told, Americans spent $638.2 billion in October, a 16 percent increase from last year. And while some of that lift is the result of higher prices, economists say there are other factors at play: Families still have savings from more than a year in relative quarantine and have gotten a boost in income from such policies as the Child Tax Credit.

But with pandemic-related disruptions still very much a reality, Americans continue to shift spending away from the service sector to consumer goods. Meaning they’re cooking at home instead of dining out, and upgrading their TVs and sound systems instead of hitting the movie theater.

Some of the biggest sales increases last month were recorded in areas traditionally driven by holiday gift-buying: Sales at electronics and appliance stores rose 3.8 percent from September, while sporting goods, musical instrument and book stores notched a 1.5 percent gain. Spending at restaurants and bars, meanwhile, remained flat.

“Consumers are very concerned about inflation, but that has not held back spending,” said Jack Kleinhenz, chief economist for the National Retail Federation, an industry trade group. “People have the ability to spend — not only from the savings cushion they built up over the last year and half, but because we’ve added new jobs, which means new income and new spending.”

Halloween merchandise and early holiday buying also boosted sales, he said. Retailers have been encouraging consumers to shop earlier this year, amid fears of shortages and delays caused by supply chain disruptions. Walmart, Target and Amazon all kicked off holiday discounts in October, when jack-o-lantern pails and ghoulish masks were still on shelves. Nearly half of Americans planned to start their holiday shopping before November, according to the National Retail Federation, compared with 39 percent two years ago.

The trade group estimates that overall holiday sales will grow as much as 10.5 percent, to a record $859 billion this year. Consumers, on average, are expected to spend $998 on gifts, food, decorations and other holiday purchases. That figure is largely in line with last year’s spending, but below a pre-pandemic high of $1,047.83 in 2019.

“Underlying volumes remain robust, and consumers are buying way more stuff than they did last year,” said Neil Saunders, managing director of the market research firm GlobalData.

There already are signs that the nation’s largest retailers are seeing those gains. Walmart said Tuesday that U.S. sales climbed 9.2 percent in the most recent quarter, as Americans spent more on groceries, clothing and holiday decor with the discount retailer.

“A strong consumer, a degree of inflation, and government stimulus” all contributed to robust sales, Walmart chief executive Doug McMillon said during an earnings call Tuesday. “Fighting inflation is in our DNA.”

At the same time, Americans say they’re increasingly skittish about the economy’s long-term prospects. On Monday, one leading measure of consumer sentiment fell to its lowest level since November 2011.

The University of Michigan Consumer Sentiment Index found Americans are increasingly wary of “an escalating inflation rate and the growing belief ... that no effective policies have yet been developed to reduce the damage from surging inflation.” According to the report, 1 in 4 consumers said inflation had eroded their living standards in November, and that lower income and older Americans were the hardest hit.

Pandemic-related factory shutdowns, product shortages and rising fuel prices have led to cascading markups for food, clothing, toys and other products. Prices surged 6.2 percent in October compared with a year earlier, marking the largest increase in three decades. Retailers say a dramatic rise in energy costs — including a 50 percent increase in gasoline prices from last year — is making it more expensive to transport goods. As a result, many major brands that had previously absorbed cost increases are now passing them on to shoppers.

“Consumer sentiment is being hit hard by the sharp rise in inflation,” said Matthew Sherwood, global economist at the Economist Intelligence Unit. But “it is not enough to keep households from hitting the stores and gearing up for Christmas.”

Still, analysts say it’s too soon to tell whether the October results will bite into retail spending in November and December, when Americans typically do the bulk of their shopping. Rising prices and shipping delays have left many retailers with less inventory than usual.

“The concern is that rising inflation and souring sentiment could hamper consumer activity later in the year,” Yelena Maleyev, an economist for Grant Thornton, wrote in a note to clients.

Erica Eckes started her holiday shopping in early October and by Halloween had declared herself done for the season.

“Like everyone else, I saw the shipping delays and thought, ‘Better sooner than later,’ ” she said.

Eckes, 24, who recently got a higher-paying job and bought a home in Washington D.C., says she has more money to spend this year than usual. She splurged on an iPhone for her boyfriend and also bought a Theragun massager, light-up wreath and an electric toothbrush, as well as books, makeup and skin-care products.

“At this point, I’m done,” said Eckes, who’s the head of sales for a start-up. “I might pick up a few more tchotchkes but no more major purchases.”