Goldman Sachs (GS 1.48%) is one of the oldest and most influential investment banks in the world. For a company with such a rich and storied history, many investors may be surprised to know that Goldman Sachs didn't become a public company until the end of the 20th century, in 1999. So, if you invested $5000 in the company at that time, how much would you have now?

The skyline of Jersey City, N.J. featuring the Goldman Sachs tower.

The Goldman Sachs Tower looms over the Jersey City, N.J. skyline. Image source: Getty Images.

May the fourth be with you

On May 4, 1999, at the height of the technology boom, Goldman Sachs finally went public. There had been years of impassioned debate within the company about an initial public offering, and the nays had long prevailed. But in 1998, the partners decided to go public. It was the last large bank in the U.S. to do so. At the time, it was one of the largest IPOs in history.

The company, in its prospectus, listed three primary reasons for going public: "[T]o secure permanent capital to grow; to share ownership broadly among our employees now and through future compensation; and to permit us to use publicly traded securities to finance strategic acquisitions that we may elect to make in the future."

The IPO raised $3.657 billion and involved 69 million shares. Shares of Goldman Sachs Group were initially offered at $53 per share and rose 33% that day to close at $70 per share.

What if you were in on the IPO?

Let's take a trip back in a time machine and invest $5,000 in that IPO. That $5,000 would buy about 94 shares. As of Jan. 27, those 94 shares were worth $238.14 per share. So, an investor who simply reinvested the quarterly dividends would have about $20,367. And someone who invested $10,000 at the IPO with dividend reinvestment would have $42,368. The stock price reached a high of $264 per share in March 2018 and a low of $44 per share in August 1999. The total return since the IPO is about 323%, and the annualized return on the stock is about 7%.

Interestingly, Goldman Sachs is one of the few large companies that have never had a stock split (that's when a company issues more shares as a way to lower the share price, create new shareholders, and boost liquidity). As my colleague Dan Caplinger explained, looking back, the company has been prudent in its decision not to -- and it probably won't any time soon.

There have certainly been more high-flying stocks than Goldman Sachs since then, but even through the worst of times, including the Great Recession, the stock has been a steady performer that has outperformed the S&P 500.