After decades on the public markets, discount retail chain Dollar General (DG -0.41%) was taken private in 2007. Its days as a privately held company, however, were short-lived. Dollar General went public again 2009. And those who invested $1,000 in the 2009 initial public offering (IPO) have nearly $7,000 now. It's been a great market-beating stock.

But 2023 was another story entirely. From 2009 through the end of 2022, its biggest drop ever had been 31%. And pullbacks of 20% or more were rare. But in 2023, shareholders lamented as they watched shares tumble a stunning 61% from their previous highs.

DG Chart

DG data by YCharts

Such an unprecedented drop deserves explanation. Dollar General's trailing-12-month sales of $39 billion are at an all-time high, so the company isn't necessarily losing consumers' interest. Rather, its profit has recently taken a hit. That's the reason for the drop in stock price.

For example, Dollar General's earnings per share in the third quarter of 2023 were $1.26, a 46% drop from the prior-year period. In short, Dollar General stock experienced its largest drawdown in 2023 because its profit evaporated.

Dollar General stock dropped to $102 per share in October. But since it hit its low, the stock has rebounded by over 40%. Is this bounceback too much too soon or a sign of future gains to come? To answer that, I'll explain what I expect will happen with Dollar General's profit in 2024 and beyond.

Where Dollar General stock is going from here

Dollar General didn't turn a blind eye to its profitability problems. It decided changes in leadership were needed. Todd Vasos was the company's CEO from 2015 through late 2022. Last October, the company brought him back. Moreover, it replaced its executive vice president of store operations in January.

Dollar General's management, new and old, already knows the problem it needs to fix: inventory. There's too much inventory in the back, leading to damage. And there's too much inventory on shelves, leading to elevated theft risk. And to quickly reduce the oversupply, the company has to sell products at discounted prices, which further hurts profit.

But remember: Dollar General clearly doesn't have a demand problem because net sales are at an all-time high. The company's same-store sales could admittedly be down 1% year over year in 2023. We'll find out when it reports full-year financial results on March 14. But even that's not bad, considering same-store sales were up 4% in 2022.

Moreover, it's reasonable to expect Dollar General's same-store sales to bounce back in 2024. Historically, consumers gravitate to this discount retail chain when budgets are stretched thin. And multiple metrics suggest that the U.S. consumer is somewhat strained right now.

Dollar General's sales will be fine. Assuming it moves past its inventory problem in the coming year, which is entirely possible, then one can reasonably expect its profit margins to rebound. Based on historical trends, I don't believe it's unreasonable to expect the company's margins to get back up over 6%.

DG Profit Margin Chart

DG Profit Margin data by YCharts

If Dollar General's profit margins bounce back as it moves past its inventory challenges, then the company could be looking at annual EPS of $10 to $11 based on its current share count. And if its stock trades at 20 times earnings, as it often has in the past, then shares could jump up past $200 per share. That would be about 40% additional upside from where it trades today.

Of course, there are no guarantees here. There are quite a few "ifs" in this equation. But I believe it proves the point I'm trying to make: When Dollar General stock fell, shares traded in deep value territory. The stock may have already gone back up quite a bit. But if the company successfully addresses its problems, then Dollar General stock has much more room to climb in 2024 and beyond.