Elon Musk won't join Twitter board—here's how much you'd have if you invested $1,000 five years ago

Twitter shares stumbled Monday morning after CEO Parag Agrawal revealed that Elon Musk decided to not join the social network's board.

The San Francisco-based company last week had announced that Musk would be joining its board of directors after the Tesla CEO paid nearly $3 billion for a 9.2% ownership stake.

But the plans fell apart>Read more about electric vehicles from CNBC Pro

‘We need batteries,’ says Morgan Stanley. Here are stocks to ride the capital spending boom

It's time to buy Nio shares after the Chinese electric vehicle maker's 44% drop, UBS says

Electric, hybrid vehicles will account for nearly 50% of cars on the road by 2040, Goldman predicts

Musk's acquisition sent the social network's stock spiking more than 20% last week, but news of his decision to not join the board briefly sent the stock down as much as 8% Monday morning before it recovered.

If you had invested $1,000 in Twitter a little over five years ago on April 4, 2017, your investment would be up 213.2% as of Monday at 11:29 a.m., according to CNBC calculations, with a total market value of $3,131.72.

It would be worth less, however, if you had invested in Twitter at its 2013 IPO price of $26. The same $1,000 investment made on November 7, 2013 would be worth $1,769.42 as of Monday morning — a return of 76.9%.

Over the same two time periods, the S&P 500 index grew by 87.82% and 153.72%, respectively.

Despite Twitter's growth over the years and Musk's recent involvement, past returns of an individual stock do not predict future results. Make sure to carefully research your options before investing.

And instead of trying to predict which stocks will go up and which will go down, consider buying low-cost index funds and holding onto them. This type of diversified fund typically stays relatively constant and avoids the ups and downs that comes with picking single stocks.