Walmart, the nation's largest retailer, reported robust first-quarter earnings on Thursday, showcasing its resilience in a high-inflation environment. The retailer's performance was driven by consumers increasingly seeking low prices, propelling Walmart's stock up over 5% in premarket trading.

Based in Bentonville, Arkansas, Walmart is among the first major U.S. retailers to release quarterly results, providing valuable insights into consumer behavior as inflation continues to weigh on spending power. The U.S. government recently reported a surprising stagnation in consumer spending between March and April, highlighting the growing pressure on household budgets.

Americans have demonstrated remarkable resilience against inflation, buoyed by a strong labor market and steady wage growth. However, signs of strain are emerging as shoppers begin to cut back under the burden of higher prices and rising debt costs. Despite a slight decline in the inflation rate, prices for essentials like packaged goods and rents remain stubbornly high.

Walmart's latest quarterly results reflect these dynamics. The retailer reported profits of $5.10 billion, or 63 cents per share, for the quarter ended April 30, significantly higher than the $1.67 billion, or 21 cents per share, reported in the same period last year. Adjusted earnings per share were 60 cents, surpassing analysts' expectations of 53 cents per share, according to FactSet.

Revenue for the quarter rose 6% to $161.51 billion, up from $152.3 billion a year ago, exceeding analysts' forecasts of $159.6 billion. Comparable store sales in the U.S. increased by 3.8%, a slight deceleration from the 4% growth seen in the previous quarter. Global e-commerce sales surged 21%, continuing the momentum from the fourth quarter's 23% increase.

The average amount spent per shopping trip remained unchanged from a year ago, but the number of transactions rose by 3.8%. This indicates that while consumers are visiting Walmart more frequently, they are not necessarily spending more per visit, underscoring the ongoing budgetary pressures they face.

Walmart has strategically adapted to these challenging conditions by launching new initiatives to drive sales and attract a broader customer base. This month, Walmart introduced Bettergoods, its largest store-label food brand in 20 years, targeting younger consumers who prioritize affordability over brand loyalty. The brand is set to feature 300 products by fall, including frozen foods, dairy, coffee, and chocolate.

In addition to bolstering its food offerings, Walmart has focused on attracting high-income households, those earning over $100,000 annually, by enhancing its home and fashion goods selection. This strategy aims to maintain the loyalty of wealthier shoppers who may otherwise be drawn to competitors.

Walmart's acquisition of smart TV maker Vizio for $2.3 billion, announced in February, is another move to strengthen its advertising business. The deal grants Walmart access to Vizio's SmartCast operating system, enabling it to offer targeted ads on streaming devices to its suppliers, thereby tapping into the lucrative digital advertising market.

However, Walmart is also scaling back in areas where it has not seen success. Last month, the company announced the closure of its health centers and virtual care service, realigning its focus on more profitable ventures.

Looking ahead, Walmart remains optimistic. The retailer expects sales for the current fiscal year to be at the high end or slightly above its previous guidance, reflecting confidence in its ability to navigate the economic headwinds.

Walmart's strong performance stands in contrast to some of its peers. Home Depot, the leading home improvement retailer, reported its third consecutive quarter of declining sales, while Starbucks recently lowered its sales expectations for the year due to slowing traffic at its stores.