There's one particular list that's star-studded these days. I'm talking about the list of companies splitting their stocks. E-commerce giant Amazon (AMZN 0.75%) completed its operation last month, Google parent Alphabet (GOOG -3.33%) (GOOGL -3.37%) is finishing up its split right now, and Tesla (TSLA 15.31%) plans to ask for approval of its proposed split during the shareholder meeting next month.

The big question in recent months has been whether it's a better idea to buy shares of these companies ahead of their stock splits or after they open at the split-adjusted price. Will gains happen leading up to the event or after? But both of these times may not be when you'll benefit most.

Signs of strength

First, a quick look at the logic behind a stock split. These operations are often signs that a company is doing well -- and future prospects are bright. Companies split their shares after the price has climbed considerably. For example, Amazon and Alphabet shares have climbed more than 100% over the past five years. They both surpassed $3,000 a share at their peaks.

In a split, a company issues more shares to current holders in order to bring down the stock price -- without changing the overall market value of the company. This lower price makes it easier for a broader range of investors to get in on the stock. It's reasonable to imagine a new wave of gains following.

With Amazon, we have an example of a pre-split and post-split performance. In the two-week period leading up to Amazon's split, the shares climbed about 20%. Since then, however, the stock has dropped about 11%.

Alphabet shares are opening at their split-adjusted price today. They climbed about 10% in the first week of the month. Since then, though, they've started to pull back.

GOOG Chart

GOOG data by YCharts.

Does this mean an investor should buy before a stock split, lock in a quick gain, and then sell? Or should they completely avoid these players in anticipation of a post-split decline? I say "no" to both of these ideas.

From the examples we've seen, buying before the split may offer you an extra gain. But this won't necessarily happen with every company. And it's impossible to predict whether a particular stock will rise or fall after a split.

When to buy?

All of this means it doesn't really matter whether you buy a stock before or after a split. And you probably won't greatly benefit right before or right after.

But here's when you probably will benefit if you pick up shares around the time of the stock split -- in the long run. As I mentioned earlier, companies usually split their stocks after a period of growth. And in many cases, there's reason to believe that growth can continue.

Ideally, you'll hold onto your investment for the long term. By that I mean at least five years. This gives the company time to increase revenue and profit. And it gives you time to benefit from the resulting share performance.

In the cases of Amazon, Alphabet, and Tesla, the prospects look good. Amazon is a leader in two growing industries -- e-commerce and cloud computing. The company has a solid track record of revenue and profit and has been aggressively investing in its business.

Alphabet is another leader -- Google dominates the search market. It holds a global share of more than 85%, according to Statista. And it's steadily grown revenue and profit into the billions of dollars.

It's also easy to imagine bright days ahead for Tesla. The company dominates the electric-vehicle market. In the first quarter of this year, Tesla reported record revenue, vehicle deliveries, and operating profit.

These elements should help Amazon, Alphabet, and Tesla gain over time -- and help you benefit from their stock splits over the long term.