What happened

Shares of Macy's (M -2.68%) surged 19% on Thursday after the department-store chain delivered surprisingly strong earnings and boosted its full-year profit forecast. 

So what 

Macy's revenue grew by 13.6% year over year to $5.3 billion in its fiscal first quarter, which ended on April 30. The gains were fueled by a 12.4% jump in the retailer's comparable-store sales.

Macy's said its customers bought fancier clothes as they returned to work and attended more social events. Women's dresses and men's suits were particularly strong sellers.

"While macroeconomic pressures on consumer spending increased during the quarter, our customers continued to shop," CEO Jeff Gennette said in a press release. "We saw a notable shift back to occasion-based apparel and in-store shopping, as well as continued strength in sales of luxury goods."

Two people shopping for dresses in a retail store.

People are returning to Macy's stores. Image source: Getty Images.

Moreover, lower promotional activity contributed to a rise in gross margin to 39.6%, up from 38.6% in the year-ago period. This margin expansion, combined with Macy's sales growth, drove a 177% surge in the company's adjusted earnings per share to $1.08.

That crushed Wall Street's expectations. Analysts had anticipated adjusted per-share earnings of $0.82. 

Now what 

These strong results and promising ongoing sales trends prompted Macy's to lift its full-year profit projections. Management now expects adjusted earnings per share of $4.53 to $4.95, up from a prior target of $4.13 to $4.52.

Gennette said Macy's investments in its omnichannel platform -- which integrates its in-store and e-commerce operations -- are helping to streamline its cost structure while also strengthening its ability to adapt to shifting consumer-spending patterns.

"We believe that the efficiencies we built into our business enable us to navigate through the current uncertain macro environment," Gennette said.