Shares of Gap (GPS 5.59%) were up 30.4% as of 12:45 p.m. ET Friday after the apparel retailer announced stronger-than-expected quarterly results and slightly adjusted its full-year outlook for the better.

Gap's third-quarter 2023 net sales declined 7% year over year to $3.77 billion, translating to GAAP net income of $218 million, or $0.58 per share (down from $0.77 per share in the same year-ago period). Adjusted for one-time items like restructuring charges, Gap delivered non-GAAP earnings of $221 million, or $0.59 per share. Analysts, on average, were only expecting adjusted earnings of $0.20 per share on revenue of $3.61 billion.

Old Navy leads the way

Within Gap's top line, its Old Navy brand led the way with net sales declining 1% year over year to $2.13 billion, as the impact of store closures slightly more than offset a 1% increase in comparable-store sales. Gap brand sales were down 15% year over year to $887 million, including a similar 1% comparable-sales decline -- but Gap sales would have fallen a more modest 6% had it not been for the sale of Gap China and the shutdown of Yeezy Gap.

Meanwhile, Banana Republic sales were down 11% to $460 million, including an 8% comparable-store sales decline, and Athleta sales dropped 18% including a 19% comparable-sales decline.

Still, Gap CFO Katrina O'Connell said the quarter reflected "ongoing progress" for the company as a whole, punctuated by expanding margins and solid free-cash-flow generation. Indeed, gross margin expanded 390 basis points from the same year-ago period to 41.3%, and Gap has generated $544 million of free cash flow so far this year.

What's next for Gap stock?

Gap also reaffirmed its previous full-year revenue outlook, which calls for 2023 net sales to decline in the mid-single-digit percent range from $15.6 billion last year. On a more positive note, Gap now expects fiscal 2023 capital expenditures of roughly $475 million, below its previous range of $500 million to $525 million, partly driven by fewer planned store openings as the company works to balance growth with profitability.

In the end, this was as strong a quarter as any Gap investor could have hoped for, with relative strength at Gap's core Old Navy and Gap brands partially offset by the continued underperformance of Athleta and Banana Republic. Assuming the company can continue to build on its momentum amid signs of moderating inflation in the coming quarters -- which could have a material positive impact on consumer spending -- I see no reason Gap's stock price can't keep rallying accordingly.