On Wednesday afternoon, Apple (AAPL 0.47%) made a surprise announcement alongside its second-quarter results. On Aug. 24, the company will execute a 4-for-1 stock split.

Some investors may be wondering: Is the stock a buy ahead of its stock split next month? After all, more investors will be able to afford Apple stock, and shares will be more liquid since they can be bought and sold at a lower price.

While shares of Apple may be attractive today, an upcoming stock split isn't the reason why.

Apple's 2020 iPhone SE

Apple's 2020 iPhone SE. Image source: Apple.

Understanding Apple's 4-for-1 stock split

Apple's upcoming stock split will be its fifth since going public. The tech company split its stock on a 2-for-1 basis in 1987, 2000, and 2005. Then it split its stock on a 7-for-1 basis in 2014. Its 2020 split will occur on a 4-for-1 basis, meaning every investor will receive four shares for every one share they own. Those shares will each be equal to one-fourth of the value of the former share.

Apple's 2020 4-for-1 stock split will occur on Aug. 28.

The reason for the stock split? To make the stock available to a large base of shareholders, Apple says.

A timely opportunity?

While on the surface it might seem like Apple stock may be a buy because of a planned share split, this doesn't make sense upon closer examination. For instance, even if there is increased demand for the stock because of its lower price after the split, other investors may capitalize on an irrational move higher in the stock price and sell their shares just as quickly as new demand arises.

Furthermore, no one knows what news could drop on a given day. There's no telling how Apple stock will trade between now and the stock split, as economic or company-specific news could have more influence on supply and demand for the stock than the stock split itself.

In short, investors should never buy a stock simply because it is about to be split.

The real reason Apple stock is a buy

Nevertheless, Apple stock does look compelling today. But the reason it looks like a good stock to buy has nothing to do with the upcoming stock split. Instead, it has to do with the company's impressive resilience during uncertain times.

A person tapping a buy key on a keyboard

Image source: Getty Images.

Apple's fiscal third-quarter revenue rose 11% year over year and its earnings per share climbed 18%. Analysts, on average, were expecting revenue to fall 3% and earnings per share to decline 6% over this same timeframe, respectively.

"Our June quarter was a testament to Apple's ability to innovate and execute during challenging times," said Apple CFO Luca Maestri in the company's fiscal third-quarter earnings call on Wednesday. "Our results speak to the resilience of our business and the relevance of our products and services in our customers' lives."

Posting growth across every segment, the company's fiscal third-quarter results during these challenging times speak to the company's upside potential when the economy recovers. It's this strong business -- not the tech company's upcoming stock split -- that makes Apple stock a buy for investors willing to hold for the long haul.