On Sept. 27, Google turned 21. The tech giant has a lot to celebrate after more than two decades in business: It's one of the world's most visited websites and its name is so popular it's been deemed a verb in the English dictionary (No, seriously — Google it!). Google's success since going public has turned out to be a positive for shareholders. A $1,000 investment in 2009 would be worth more than $4,800 as of Oct. 2, 2019, for a total return of around 400%, according to CNBC calculations. In the same time frame, by comparison, the S&P 500 earned a total return of just more than 250%. The company, which went public in 2004, has a current share price around $1,200. While Google's shares have done well over the years, any individual stock can over- or underperform and past returns do not predict future results. It's important to note that Google is actually now called Alphabet. This change took place in 2015 as a way of reorganizing the company and its growing number of businesses beyond search. GOOGL, as it's shown in the chart below, is a stock ticker symbol for Alphabet, Google's parent company. CNBC: Google's stock since 2009.

How Google got its start

Google was founded in 1998 by two Stanford Ph.D. students, Sergey Brin and Larry Page. The pair wrote and published a paper about developing a "prototype of a large-scale search engine," which became the first iteration of the Google we know today.

Larry Page (L), then co-founder and president, products, and Sergey Brin, then co-founder and president, technology, at Google's campus headquarters in 2003. Kim Kulish | Corbis Historical | Getty Images

At first, Brin and Page operated Google out of a tight garage space in Menlo Park, California. But by spring of 1999, they moved into a proper office space in Palo Alto, California. The company relocated again in 2004 to a complex of buildings in Mountain View, California, now known as "Googleplex." In 1999, Google earned $220,000 in annual revenue. Four years later, in 2003, it brought it nearly $1 billion, earning the title of "Fastest Growing Tech Company in North America," according to Deloitte's 2004 Technology Fast 500 ranking.

Google's expansion over time

Google's rapid growth opened up major doors for expanding the business. In 2001, Page and Brin hired Eric Schmidt as Google's CEO to help them grow the company. With Schmidt in charge, Google quickly expanded beyond its core identity as a search engine. In 2003, Google launched AdSense, an advertising program used by website publishers to target users. Venturing into the advertising space has proved profitable for Google, with 85% of its total revenue is still generated by advertising tech. Google acquired smartphone platform Android in 2005 and added YouTube to its portfolio in 2006. The company also bought Motorola Mobility in 2011 to step up its smartphone production process and smartphone navigation app Waze in 2013. It total, Google has acquired more than 200 businesses, and by 2010, it was purchasing companies at an average pace of two per month.

Attendees visit the Android booth during a Google I/O developers conference in San Francisco. Getty Images

As of 2017, Chrome surpassed competitors, including Internet Explorer, Safari and Mozilla Firefox, in popularity with 44.5% market margins.

By the fall of 2015, the Silicon Valley-based tech giant made the decision to restructure. Its new parent company was named Alphabet, and Google became its main subsidiary. The reorganization separated out profitable businesses from more ambitious, experimental ones, which served as a way to protect investors while still allowing for innovation. That same year, Sundar Pichai, Google's senior vice president in charge of products, took over as CEO. Google's restructuring proved successful. By 2018, the creation of Alphabet increased Google's stock price by more than 85% and revenue for Alphabet's other subsidiaries rose nearly 50% year over year.

The latest on Google