May 17 (Reuters) - Walmart Inc reported a 25% drop in quarterly earnings and cut its full-year profit outlook on Tuesday as rising costs of fuel and labor hurt its bottom line while shoppers squeezed by decades-high inflation moved to buy lower-margin basics.

Shares of the retailer fell nearly 10% in morning trading, its biggest one day percentage drop since Feb. 2018, and dragged down shares of rival Target Corp by 3%.

Target reports results on Wednesday.

Walmart serves as a barometer for U.S. consumer sentiment as it is the United States' largest retailer operating more than 5,000 stores and commands a leading position in domestic grocery sales. Its earnings are closely watched by investors for hints about the health of the U.S. economy.

With inflation at nearly 4-decade highs, CEO Doug McMillon characterized the operating environment as "unusual" and that its profit drop was "unexpected."

McMillon cited elevated costs of everything from fuel to labor and ecommerce fulfillment as factors for dragging down its earnings to $1.30 per share in the first quarter, which missed estimates by a wide margin of 18 cents, and marked its first miss in five quarters.

While some consumers are watching their spending closely and gravitating to private-label brands and half-gallons of milk, others are spending on gaming consoles and other higher margin items, Walmart's CFO Brett Biggs told Reuters.

It has been difficult to estimate how consumers are reacting to higher inflation, with U.S. ecommerce data on Tuesday showing a healthy 0.9% rise in April retail sales.

The broad rise suggested demand was holding strong despite higher prices and assuaged fears that the economy was heading into recession.

Walmart reported a strong 3% rise in U.S. same-store sales for its first quarter, spurred by higher sales of food and health and wellness products.

Sales of general merchandise, including patio furniture, apparel and landscaping items fell, in part due to cooler weather, but the company said interest in those higher-margin items has picked up in recent weeks.

Still the strong quarterly sales came at the expense of margins as Walmart strived to keep prices low while absorbing higher costs.

Gross margins at its U.S. business fell 38 basis points due to higher fuel and online delivery costs, while operating expenses rose 45 basis points as a percentage of net sales due to elevated inventories and wage costs, exacerbated by a rapid return of employees from COVID leave leading to higher staffing.

On a post-earnings call, Walmart executives said they are also witnessing prices of food rising at double digit rates, but will work with suppliers to keep costs low.

"We'll continue to reduce costs where we can and manage pricing in a way that preserves competitive price gaps while managing the bottom line and passing on costs where they appear to be less temporary in nature," Biggs said.

The comments likely spooked investors in consumer packaged goods companies, CFRA analyst Arun Sundaram said, after shares of Walmart suppliers such as ConAgra, General Mills and Mondelez slid in trading.

Sundaram was bullish on Walmart's prospects, saying the quarterly performance was a blip.

"We don't expect this (quarterly) miss to become a norm, seeing that Walmart has historically outperformed competition during tough economic times."

FORECAST CUT

The Bentonville, Arkansas-based retailer is not alone in feeling the pressure of ballooning costs.

Rival Amazon.com Inc last month said it could post an operating loss of as much as $1 billion in the current quarter as it sinks more money into higher wages and to run its warehouses. Shares of the company, which also flagged overstaffing issues hurting productivity, have lost nearly a quarter of their value since then.

Walmart said it now expects fiscal 2023 earnings per share (EPS) to fall about 1%, rather than rise by mid-single digits seen earlier.

It also tempered its second-quarter expectations, with EPS now expected to be flat to up slightly, compared to a low to mid-single digit increase previously.

It however, said it expects second quarter sales to rise 5% and raised its full year sales forecast to 4% in constant currency, from 3% earlier.

(Additional reporting by Arriana McLymore in New York; Editing by Sriraj Kalluvila, Tomasz Janowski and Nick Zieminski)