Investors often love stock splits since they typically indicate a stock has gained enough value to warrant splitting its shares into several pieces. Let's take a look at two timely examples -- one stock split that recently took place and another that is upcoming -- to see whether or not either one makes sense for investors today.

Walmart (WMT -0.08%) this week announced an unanticipated stock split in this dry season, and that's getting investors pumped about it. Walmart stock jumped after the announcement, and it could be a great time to buy.

On the other hand, Celsius Holdings (CELH 2.12%) is down since it split its stock in November, and investors might still want to wait before they consider buying it.

Buy Walmart stock

Companies offer various explanations as to why they undertake stock splits -- and sometimes, no explanation at all -- but Walmart was clear about why it's engaging in a 3-for-1 stock split at the end of February.

"Sam Walton believed it was important to keep our share price in a range where purchasing whole shares, rather than fractions, was accessible to all of our associates," CEO Doug McMillon said. He asserted that Walmart felt this was the right time to do it, given the company's "growth and our plans for the future."

Walmart is the largest company in the U.S. by sales, with 4,600 stores domestically and 10,500 worldwide, some of them under other names. It's growing steadily despite the complex macroeconomic environment, with a 5.2% revenue increase year over year in its fiscal 2024 third quarter (which ended Oct. 31).

That was primarily driven by strong comparable-sales growth of 4.9%, which is what you want to see for large, established companies. With giant retailers like Walmart, which have more limited opportunities for store-count expansion, investors should pay attention to how well they can generate higher sales per store. Management raised its full-year revenue growth outlook from a 5% increase to 5.5%, and it raised earnings per share guidance from $6.40 to $6.48.

Walmart's dividend yields 1.4% at the current share price. It has raised its payout annually for the past 50 years, which means that last year it entered the exclusive category of the Dividend Kings. Walmart is a well-established company and a reliable stock, and it could be a strong anchor for a diversified portfolio. It reports its fiscal fourth-quarter results on Feb. 20, and the pending stock split is giving it some extra energy.

Avoid Celsius stock

Celsius markets energy drinks that it touts as better for consumers' health, and it has been demonstrating massive growth over the past few years.

In the third quarter, its revenue increased 104% year over year, but it's still a relatively small company, with almost $1.2 billion in trailing-12-month sales. North American revenue accounts for almost the entire business, but it's starting to pick up steam in international markets as well, with 56% year-over-year sales gains in the third quarter. Foreign markets present a massive growth opportunity for Celsius.

The company has now reported three consecutive quarters of net profits, and positive net income for the trailing-12-month period. Gross margin expanded from 41.8% in the prior-year period to 50.4% in Q3 due to scaling and efficiency, and operating margin was 25.4% after an operating loss last year.

Celsius continues to gain traction and market share. Market data shows Celsius sales up by a triple-digit percentage while the overall energy category grew by a mid-teens percentage. It's not the top energy drink by sales, but that just means it still has tons of opportunity.

Meanwhile, Celsius stock has gained 56% over the past year and trades at a rich valuation of 10 times trailing-12-month sales. It deserves some kind of premium for its incredible growth rate and sustained profitability. However, its price has been coming down over the past few weeks because the premium might be too high, especially in a volatile economy.

The company may not be able to keep up the high growth rate required to justify this kind of sales multiple. If its fourth-quarter results demonstrate slower growth or if it misses expectations, its stock could fall. Conversely, if it comes through again, the stock will likely jump.

Celsius could be an excellent growth stock to add to your portfolio, but you might want to avoid it right now and wait for more stability and a better entry point.