MINNEAPOLIS — An unexpected slowdown in shopping in the recent quarter prompted Target Corp. management to lower its full-year sales and profit outlook. Comparable store sales were down 5.4% from the prior year, reflecting a 4.8% decline in traffic.

“As we began to see softening sales trends early in the quarter, the team in our stores and supply chain responded with speed and agility,” said Brian C. Cornell, chairman and chief executive officer, during an Aug. 16 earnings call. “Their discipline, along with ongoing efficiency efforts, allowed our profit performance to exceed our original expectations despite a meaningful shortfall on the top line. More specifically, for the quarter just ended, operating income expanded by more than $800 million compared with a year ago.”

Net earnings for the second quarter ended July 29 increased 357% to $835 million, equal to $1.81 per share on the common stock, from $183 million, or 40¢ per share, in the prior-year period.

“As you’ll recall, in the first half of 2022, we were faced with excess inventory, driven by a rapid change in consumer spending patterns,” Mr. Cornell said. “In the face of that challenge, the team took important steps a year ago, allowing us to quickly adjust our inventory down to the proper level … and importantly, last year’s inventory actions laid the groundwork for the recovery in profitability we've achieved so far this year.”

Total revenue in the second quarter declined 4.9% to $24.77 billion from $26.04 billion.

“As we’ve described for more than a year now, the divergence of sales trends between our frequency and discretionary categories is being driven by multiple cross currents that are affecting the US consumer,” Mr. Cornell said. “These include the impact of inflation in frequency categories, like food and beverage and essentials, causing these categories to absorb a much higher portion of consumers' budgets. In addition, consumers are choosing to increase spending on services, like leisure travel, entertainment and food away from home, putting near-term pressure on discretionary products. And finally, the rollback of government efforts to support consumers during the pandemic, including stimulus payments, enhanced childcare tax credits and the suspension of student loan payments, presents an ongoing headwind that consumers continue to manage.”

Christina Hennington, chief growth officer, noted food and beverage sales grew by low single digits in the quarter, led by strength in snacks, candy and beverages.

Year-to-date net earnings totaled $1.76 billion, equal to $3.87 per share, up 50% from $1.19 billion, or $2.57, in the comparable period of the prior year. Total revenue for the six months declined 2.2% to $50.1 billion from $51.21 billion.

Based on year-to-date performance, executives of the Minneapolis-based mass-market retail company now expect full-year earnings per share in the range of $7 to $8, down from the prior range of $7.75 to $8.75.

“On the top line, we’re now planning for comparable sales in a wide range centered around a mid-single-digit decline for the remainder of the year, consistent with what we experienced in July and the second quarter overall,” said Michael J. Fiddelke, chief financial officer. “This updated sales expectation is meaningfully softer than our expectation at the beginning of the year.”

Shares of Target Corp. increased 3% on Aug. 16, closing at $128.75 on the New York Stock Exchange, up from $125.05 the day before.