After a tough 2022, the stock market has bounced back nicely in 2023, with the benchmark S&P 500 up roughly 17% year to date. However, not all stocks have participated in the rally, so they look cheap compared to previous highs. With that in mind, here are three undervalued stocks with the potential to provide substantial gains for long-term investors.

1. Cedar Fair

With summer drawing to an end, many kids will be looking for one last visit to an amusement or water park before school starts. As the owner and operator of 11 regional amusement parks and four water parks, Cedar Fair (FUN 1.11%) is poised to welcome many of these outings.

Cedar Fair stock has dropped roughly 7% year to date and is well below its pre-pandemic price of $55 per share. Nonetheless, the company has surpassed pre-pandemic revenue and net income. For the past 12 trailing months, Cedar Fair generated $1.8 billion in revenue and $307 million in net income -- up 23.2% and 78.5%, respectively, from 2019.

Cedar Fair has seen revenue dip slightly through the first six months of 2023 compared to 2022. The company has also received some negative press this summer. One of its roller coasters -- which opened in 2015 at its Carowinds park near Charlotte, North Carolina, and cost an estimated $30 million to build -- was shut down when a stress fracture was discovered. The ride has since reopened after being under repair for six weeks.

Regarding the stock, Cedar Fair's price-to-earnings (P/E) ratio, a conventional valuation metric for established companies, stands at 8.6. In contrast, the company's five-year median P/E ratio has been 17.8, highlighting a substantial discount in the current stock trading.

A stock chart resembling a roller coaster ride.

Image source: Getty Images.

2. Crocs

Crocs (CROX 1.53%), the casual footwear maker, has seen its stock fall 4% in 2023 despite record revenue of $1.96 billion and net income of $362 million through the year's first half. Now, that record revenue is partly due to its $2.5 billion acquisition of HeyDude, a competing casual shoe brand, in early 2022.

But HeyDude is also likely the catalyst for the company's recent stock drop after management cut the brand's 2023 revenue guidance growth from mid-20% to a range of 14% to 18% on a reported basis. Management blamed the drop in guidance on softer-than-expected demand from its wholesale partners as they manage their inventory "very closely."

Still, there is a lot of positive momentum for Crocs. The company has paid down its net debt (total debt minus cash and cash equivalents) by 31%, from $2.7 billion to $1.9 billion, since the HeyDude acquisition closed in February 2022.

Additionally, management recently initiated a share-repurchasing program in July and has $1.0 billion remaining after spending $50 million on the shareholder-friendly strategy. With a market capitalization of $6.4 billion, the share repurchases could have a significant impact on decreasing the company's outstanding share count, making existing shares all the more valuable.

Beyond Crocs' recent performance and management returning capital to shareholders, its valuation is the most striking metric for the company's stock. That's because, over the past five years, Crocs stock has had a median P/E ratio of 14.2, yet it is currently trading at a P/E ratio of just 9.6, signaling a potential bargain.

3. Ulta Beauty

Ulta Beauty (NASDAQ: ULTA) is a leading beauty retailer offering a diverse range of cosmetics, skincare, and hair products. Despite its price hovering around $450 per share, the stock is down 4% year to date and 18% from its all-time high.

Regarding the stock's underperformance in 2023, the company's operating margin is on the decline. Specifically, the company's operating margin fell from 18.7% in Q1 2022 to 16.8% in Q1 2023. Additionally, management lowered its guidance for fiscal 2023 from 14.7%-15% to a range of 14.5%-14.8%. As for why it matters that the operating margin is falling, it's a metric indicating that Ulta's profits are tightening because its sales growth isn't outpacing its selling, general, and administrative expenses.

Management attributed the decline in operating margin to "shrink," referring to the loss of unpaid items, commonly recognized as theft or organized retail crime. Consequently, in response to this issue, Ulta has increased staffing and security to curb the "concerning trend."

Yet, Ulta sales continue to accelerate, with $2.6 billion in its fiscal Q1 2023, representing a year-over-year increase of 12.6%. Also, management raised its 2023 fiscal-year guidance to between $11 billion and $11.1 billion in sales, representing at least an 8% increase from its fiscal 2022.

Ulta is one of the increasingly rare public companies that have more cash and cash equivalents than debt, with roughly $637 million to its name. As a result, the company likely won't need to take on expensive debt that could weigh down its balance sheet as U.S. interest rates hit a 22-year high.

In summary, the timidness surrounding Ulta's operating margin is something to monitor, but the demand and financial health of the business remain strong. This suggests the recent decline in its stock price has created an opportunity for long-term investors, given the stock is currently trading at a P/E ratio of 18.3, near its lowest point in the past five years.

ULTA PE Ratio Chart

ULTA PE Ratio data by YCharts. PE Ratio = price-to-earnings ratio.

Are these discounted stocks buys?

These three stocks are all down due to bad press, slower-than-expected growth, and shrink. Encouragingly, the potential downside of these stocks appears to have been largely factored into their current prices, implying that a swift reversal could materialize should management effectively address the specific areas of concern.

For investors willing to buy and hold for the long term, these stocks present an opportunity to own great businesses at a discount, which, more often than not, will produce outsized returns.