What happened

Shares of Wayfair (W 2.08%) beat the market this week, gaining 9% through Thursday trading compared to a 2% decline in the wider market. That spike contributed to big gains for shareholders this year. The stock is up 157% so far in 2023 according to data provided by S&P Global Market Intelligence.

The rally was sparked by a second-quarter earnings report that showed continued progress toward a growth rebound for the e-commerce business.

So what

Wayfair's sales are still under intense pressure from the shift in consumer demand away from online sales channels and away from the broader home furnishings niche. Its active customer base fell 8% and average spending per customer declined despite higher prices. Shoppers spent on average $307 on Wayfair's platform this past quarter, down from $330 in the year-ago period.

Still, management had some encouraging metrics to highlight, including a rising order count and stability in the core U.S. market. Revenue was flat there after falling 5% in the previous quarter. Wayfair might soon return to growth if this trend extends into the third quarter.

Just as importantly, the company achieved several important financial goals. Wayfair reported positive earnings on a non-GAAP (adjusted) basis and returned to positive cash flow. Net losses also improved to $46 million compared to nearly $400 million a year ago. "We think we are now in a very exciting place," CEO Niraj Shah said in a press release, "having scale while remaining ambitious and entrepreneurial."

Now what

Investors can feel reasonably confident that Wayfair will return to sales growth soon. Strong financial metrics like gross profit margin and positive cash flow point to accelerating earnings gains as well. These factors help explain why the stock has rallied in 2023 even though the e-commerce specialist is still operating in the red.

Wayfair stock remains far below the highs that investors saw in 2021, and that decline makes sense considering the business is on pace for a third consecutive year of falling sales. Yet shares could continue outpacing the market this year if the company maintains its positive operating and financial momentum.