What happened

Shares of Abercrombie & Fitch (ANF -3.67%) leaped 21.7% on Tuesday after the apparel retailer reported a surprise profit.

So what

Abercrombie's sales declined by 3% year over year to $880 million in its fiscal third quarter that ended Oct. 29. A 10% jump in the company's namesake brand sales partially offset a 12% decline in its Hollister brand sales.

Although inflation and job losses are forcing consumers to pare back their discretionary spending, people are still buying clothes as they return to traditional work locations and resume social activities.

"We were pleased to see year-over-year sales trends improve across brands in light of the global macroeconomic environment," CEO Fran Horowitz said in a press release. "While net sales were down 3% as compared to last year on a reported basis, net sales were flat on a constant currency basis."

Still, inflationary pressures, such as higher raw material and shipping costs, took a toll on the company's profits. Abercrombie's gross margin fell 4.5 percentage points to 59.2%. Its operating income, in turn, decreased to $18 million from $73 million in the prior-year quarter.

However, Abercrombie was able to eke out an adjusted profit of $0.01 per share. That was a welcome surprise for Wall Street. Analysts had expected the company to post a per-share loss of $0.14. 

Now what

Better still, Abercrombie lifted its sales and profit forecast. Management now sees sales decreasing by 2% to 3% in 2022, compared to its prior projection of a mid-single-digit decline. The company also expects an operating margin of 2% to 3%, up from 1% to 3%.

"We are cautiously optimistic as the holiday season kicks into high gear," Horowitz said.