Three weeks ago, Tesla (TSLA -1.11%) announced plans for a stock split. This announcement was followed by stock-split announcements from Alphabet and Amazon.

The key question right now is whether the upcoming splits make these stocks attractive buys. Let's take a closer look at how top stocks performed after splits to find out the answer.

Tesla and Apple stock splits

To begin with, it is important to understand that a stock split simply changes the number of outstanding shares of a company, as well as the price of each share, while the market value of the company overall remains the same. As a simple example, suppose you hold a share that carries a market price of $100, and the company executes a for a 5-for-1 split. After the split, you'll be holding 5 shares of this company, each worth $20.

Keeping this is mind, let's see how Tesla and Apple (AAPL -0.35%) stocks fared after their last stock splits. Both companies split their respective stocks in 2020, and the stocks have risen significantly since then.

TSLA Chart

TSLA data by YCharts.

Tesla's stock price has nearly doubled from its split date of Aug. 31, 2020. By comparison, Apple's stock has risen 28% so far since its split. Each stock outperformed the roughly 13% rise of the Nasdaq Composite Index during this timeframe. Moreover, both the stocks also rose significantly from the date the split was announced up to the split date.

Though this would be Tesla's second split in its history, Apple has split its stock five times so far.

AAPL Chart

AAPL data by YCharts.

Apple's stock performance since its split prior to the 2020 split has also been impressive. The stock has risen 605% since its June 9, 2014, split. It outperformed the Nasdaq Composite's 208% rise during this period.

Should you buy Tesla stock ahead of its split?

While the above discussion seems to suggest that buying stocks ahead of splits makes sense, that isn't entirely correct. How a stock fares in the long run primarily depends on the company's performance. If the company faces headwinds, its stocks may falter -- split or no split.

Consider Nvidia's (NVDA 6.18%) stock split in July last year.

NVDA Chart

NVDA data by YCharts.

Though Nvidia stock rose in the months following the split, it has given back almost all the gains. A failed deal with Arm Limited, valuation concerns, and headwinds for the semiconductor industry are among the reasons hurting Nvidia stock lately.

So, while stock splits usually indicate growing businesses, they don't guarantee a rise in a stock's price; that depends on the company's performance. If you are considering buying Tesla's stock, there are several plausible reasons other than its potential stock split to do so.