The stock market is rallying, and there's still time for it to enter a bull market before the new year starts. That would be a great way for investors to end the year, but it would also mean they have less to choose from in the bargain bin.

Cheap stocks aren't always bargains, though. The "bargain" label implies both a low valuation and high quality; valuations typically mirror a stock's potential and performance. Stocks get priced at a premium when investors view the opportunity they present as compelling, and they get low valuations when there isn't much to get excited about.

So when you find a company that has incredible potential trading at a low valuation, you might want to grab shares. Ulta Beauty (ULTA -0.40%) is an amazing choice.

The beauty consumer's favorite store

Ulta operates a chain of stores that sell cosmetics, hair care products, and skincare products. These locations also feature on-site hair salons. While this sounds like a simple concept, it was strikingly new when it debuted in 1990, and it's still fairly unique.

What Ulta understands is that beauty consumers can and do easily switch between mass-market brands and upscale brands. Prior to Ulta, these shoppers had two choices: They could patronize department stores that only sold expensive makeup, or pharmacies that only carried cheap brands. Ulta brought all of those brands together under one roof.

It's a model that wouldn't work in every industry, but it works beautifully (pun intended) for the beauty industry.

Ulta has achieved incredible growth over the years. Its hair care services are a critical part of the model as well, as they make its stores a go-to destination for many consumers. This leads to higher revenue, as its service customers spend more money on products as well.

The chain has more than 1,350 stores across the U.S., and a robust omnichannel network. Between 2018 and 2022, its e-commerce sales grew at a compound annual rate of 27%, bolstering the company's overall performance and elevating its position as a leader in the beauty industry. It's also innovating with ideas such as its store-within-a-store concept at Target, a partnership that has expanded to more than 420 Target locations.

Short-term pressure brings long-term opportunity

So why is Ulta stock down 12% this year? Sales growth is slowing, and investors have been disappointed with Ulta's operating margins. In its fiscal 2023 second quarter, which ended on July 29, revenue increased 10% year over year, and net income increased from $298 million to $300 million, but operating margin dropped from 17% to 15.5%. Comps increased by only 8%, which was a deceleration.

Investors are worried about Ulta's performance, but part of the problem is that its customers are trading down to less expensive products. They're still shopping at Ulta, though, because it sells options at a wide range of prices. In this climate, that's a particular advantage for it -- its established customers don't have to switch to other sources to get cheaper products. But their moves to cheaper products are cutting into its revenues and margins.

But these issues, driven as they are by macroeconomic conditions, should be temporary. Ulta has done a fabulous job of generating higher annual sales and net income over the past five years. Its operating margin also remains well ahead of where it was prior to the pandemic.

Ulta sales and income growth.

Image source: Ulta Beauty.

Ulta stock currently trades at less than 17 times trailing 12-month earnings. Considering its double-digit percentage growth, increasing net income, and potential, the stock looks undervalued. As the impacts of inflation moderate and people go back to spending on more expensive products, Ulta should rebound, and its stock should get back to delivering market-beating performances.

The company releases its fiscal third-quarter report later this week. If the results demonstrate progress, expect Ulta stock to jump.