The e-commerce and technology giant Amazon (AMZN 0.75%) has evolved massively since it went public in 1997 as an online used book store. Today, the company is an international conglomerate that operates in multiple industries. Amazon now sells and ships almost any item imaginable and operates large business divisions focused on advertising, cloud computing, healthcare, and grocery shopping.

It's hard to believe that the company has come so far in a little under three decades. Amazon has also turned out to be a great investment for its shareholders over the years. If you had invested $4,000 in Amazon during its IPO and kept it invested, here's how much money you'd have today.

The evolution of Amazon

Jeff Bezos, the visionary who launched Amazon in 1994, started the company out of his garage, where he and a few other employees would process online orders and package and ship the books themselves.

In 1997, the company went public with a market cap of around $300 million and later that year it would open up a second distribution center. The next year, Amazon expanded into sales of CDs and DVDs. Just before the turn of the century, Amazon launched a third-party marketplace that enabled users to sell stuff to one another through the website, really driving traffic.

In 2002, Amazon continued to expand its e-commerce operations by selling apparel, and in 2003 the company launched Amazon Web Services, allowing other businesses to essentially use the company's technology to set up online stores via licensing. In 2005, the company launched Amazon Prime, charging an annual subscription fee for free two-day shipping on most orders. The service, which has expanded to include things like Amazon's video streaming service, has more than 200 million members.

Starting in 2008, Amazon began a massive acquisition spree to build its empire. These acquisitions include the purchase of the audiobook company Audible, the online shoe store Zappos, The Washington Post newspaper, the video gaming social media website Twitch, Whole Foods grocery chain, and more recently the healthcare technology company One Medical.

Amazon also rolled out several of its own technology products, including the Kindle, its smart speaker Echo, its own smartphone, and its streaming device dubbed the Amazon fire stick. Many of its businesses went on to dominate their respective markets. For instance, Amazon Web Services holds the leading market share in the cloud service space with 33% in 2022.

In 2021, Bezos stepped down as CEO and became executive chair of the board of directors. Andy Jassy, a longtime veteran of the company, became the new CEO.

If you had invested $4,000 in Amazon in 1997...

Amazon now has a market cap exceeding $1.3 trillion. It's been a phenomenal stock to own, especially if you had the foresight to purchase it around the IPO. Since going public in 1997, Amazon stock has generated a total percent change of roughly 182,900%, which also incorporates the various stock splits that have happened along the way.

That means that if you had invested $4,000 in Amazon in 1997, you would now have roughly $7.32 million. Had you invested $4,000 in the S&P 500 in 1997, you would now have roughly $20,800, meaning that Amazon has absolutely thumped the market since going public.