Traders work on the floor of the New York Stock Exchange (NYSE) in New York City, U.S., January 26, 2022.
Traders work on the floor of the New York Stock Exchange (NYSE) in New York City, U.S., January 26, 2022. Reuters / BRENDAN MCDERMID

U.S. stocks ended sharply lower Tuesday as a profit warning by Walmart dragged down retail shares and exceptionally weak consumer confidence data also fueled fears about spending.

Walmart shares sank 7.6% after the retailer cut its full-year profit forecast late on Monday. Walmart blamed surging prices for food and fuel, and said it needed to cut prices to pare inventories.

Shares of Target Corp fell 3.6% and Amazon.com Inc dropped 5.2%, while the S&P 500 retail index declined 4.2%.

On Tuesday, data showed U.S. consumer confidence dropped to nearly a 1-1/2-year low in July amid persistent worries about higher inflation and rising interest rates.

"The majority of companies that reported today beat (on) earnings, and that's been the case. But of course there have been some warnings, and that's what the market is focusing on," said Peter Cardillo, chief market economist at Spartan Capital Securities in New York.

Amazon, which said it would raise fees for delivery and streaming service Prime in Europe by up to 43% a year, was the biggest drag on the Nasdaq and S&P 500, while consumer discretionary fell 3.3% and led declines among S&P 500 sectors.

The Federal Reserve started a two-day meeting, and on Wednesday it is expected to announce a 0.75 percentage point interest rate hike to fight inflation. Investors have worried that aggressive interest rate hikes by the Fed could tip the economy into recession.

The Dow Jones Industrial Average fell 228.5 points, or 0.71%, to 31,761.54, the S&P 500 lost 45.79 points, or 1.15%, to 3,921.05 and the Nasdaq Composite dropped 220.09 points, or 1.87%, to 11,562.58.

A busy week for earnings also included reports from Alphabet Inc and Microsoft Corp after the bell.

Shares of Microsoft were down 0.5% in after-hours trading while Alphabet was up 3% following the companies' results. Microsoft ended the regular session down 2.7% and Alphabet ended 2.3% lower on the day.

Investors had been looking to see if this week's earnings news from mega-cap companies might help the stock market sustain its recent rally.

Earnings from S&P 500 companies were expected to have risen 6.2% for the second quarter from the year-ago period, according to Refinitiv data.

Also during the regular session, Coca-Cola Co gained 1.6% after the company raised its full-year revenue forecast. McDonald's Corp rose 2.7% after beating quarterly expectations.

3M Co rose 4.9% after the industrial giant said it planned to spin off its healthcare business. General Electric Co gained 4.6% after the industrial conglomerate beat revenue and profit estimates.

In other outlooks, the International Monetary Fund cut global growth forecasts again.

Volume on U.S. exchanges was 9.60 billion shares, compared with the 10.93 billion average for the full session over the last 20 trading days.

Declining issues outnumbered advancing ones on the NYSE by a 1.73-to-1 ratio; on Nasdaq, a 1.72-to-1 ratio favored decliners.

The S&P 500 posted 1 new 52-week highs and 30 new lows; the Nasdaq Composite recorded 39 new highs and 138 new lows.