BJ's Wholesale (NYSE:BJ) has long remained a struggling retailer overshadowed by larger peers such as Costco and Walmart's Sam's Club.

However, it has seen a massive surge in sales amid the pandemic. This was again confirmed upon the release of the company's third-quarter earnings. Due to its dramatically improved financials, the stock has finally made itself worthy of investor consideration.

BJ's slow path to success

Admittedly, BJ's stock has not looked appealing in the recent past. Although founded at about the same time as Costco, BJ's has not seen as much growth as its West Coast-based peer. Costco covers nearly every U.S. state and operates warehouses on four continents. BJ's has remained primarily on the East Coast, so few people west of the Mississippi have likely set foot in a BJ's warehouse.

Before the pandemic, it was a retailer struggling with meager sales growth, weak cash flows, and massive debt. Consequently, its stock attracted little interest. After the company launched its second IPO in 2018, it traded in a range until early 2020.

Interestingly, COVID-19 could become the best thing that ever happened to BJ's Wholesale. Thanks to the pandemic, this once-stagnant stock has broken out of its range. Although the stock has plateaued in recent weeks, the surge from the March lows has led to stock growth of about 90% since the beginning of the year.

BJ Chart
BJ data by YCharts

The game changer

Perhaps no area shows this virtuous cycle more than the company's free cash flow. Today, cash flows have remained strong, despite an expected decline as the company prepares for the holiday season.

According to the latest earnings announcement, free cash flow was just over $20 million for the third quarter of 2020. However, over the first three quarters of the year, it came in at more than $675 million. In comparison, the company generated about $180 million in free cash flow in all of fiscal 2019.

Improved profitability made these higher cash flows possible. In the most recent quarter, adjusted earnings per share of $0.92 per share amounted to a 124% increase from year-ago levels. A 19% increase in comparable club sales (excluding gasoline) and a 200% surge in digitally enabled sales fueled this profit increase.

The balance sheet also experienced a dramatic improvement in one key area. Long-term debt fell by more than $350 million from last quarter alone to about $845 million. This will go a long way toward stabilizing the company's balance sheet.

The outside of a BJ's Wholesale store and a liquor store.

Image source: Getty Images.

BJ's value proposition

Additionally, if earnings forecasts prove accurate, these increases should continue. Analysts forecast 93% profit growth for the current year. Although they foresee a 10% pullback next year, the company appears positioned to hold on to most of its sales gains.

Moreover, it appears the stock price has not fully reflected the gains in net income. Even after surging in the late spring and summer, BJ's still trades at a significant discount to its peers. At a forward P/E ratio of about 17, it comes in lower than Costco, Walmart, and Amazon.

Furthermore, BJ's operates in 16 states and has expanded into Ohio and Michigan in recent years. Management has made expanding its footprint one of its priorities. This could point to a strategy in which this regional retailer eventually goes national, and perhaps someday, opens warehouses outside of the U.S.

Investors should remember that in past decades, such growth trajectories led to outsized returns in retail stocks like Costco, Walmart, and Home Depot. Since the market cap of BJ's stands at just under $6 billion, investors can still buy while the company is comparatively small.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.