Walmart Inc. reported increases in second-quarter profits and sales Thursday as it pulls in shoppers seeking low prices for groceries and other essentials to offset worries that new U.S. tariffs may make a variety of goods more expensive.

The nation's largest retailer also increased its annual profit and sales outlook. Quarterly results from Walmart and other major U.S. retailers this week offer clues on how consumers are reacting to the possibility of tariff-related price increases.

The company, based in Bentonville, Arkansas, said it earned $7.03 billion, or 88 cents per share, for the three-month period that ended ended July 31. That compares with $4.50 billion, or 56 cents per share, a year ago.

Sales rose nearly 5% to $177.4 billion.

A growing list of companies, including Procter & Gamble, E.lf. Cosmetics, Black & Decker and Ralph Lauren, told investors in recent weeks that they planned to or already had raised prices because of tariffs, though modestly.

Walmart said in May that prices had started to increase in late April and got higher in May. But it said Thursday that it had introduced 7,400 price rollbacks, or temporary discounts, across the aisles in the latest quarter.

Walmart's U.S. comparable sales — those from established physical stores and online channels — rose 4.6% in the quarter, slightly higher than the 4.5% gain in the fiscal first quarter. Groceries and health and wellness items fueled the growth, the company said., the company said.

Global e-commerce sales rose 25%, above the 22% growth in the fiscal first quarter.

Despite Walmart's solid quarter, its stock price was down more than 2% early Thursday as its earnings per share came in below what analysts had expected. Analysts were expecting 73 cents per share on sales of $175.93 billion for the quarter, according to FactSet.