Google began in March 1996 as a research project by Larry Page and Sergey Brin, Ph.D. students at Stanford working on the Stanford Digital Library Project (SDLP). The SDLP's goal was “to develop the enabling technologies for a single, integrated and universal digital library." and was funded through the National Science Foundation among other federal agencies. In search for a dissertation theme, Page considered—among other things—exploring the mathematical properties of the World Wide Web, understanding its link structure as a huge graph. His supervisor Terry Winograd encouraged him to pick this idea (which Page later recalled as "the best advice I ever got") and Page focused on the problem of finding out which web pages link to a given page, considering the number and nature of such backlinks to be valuable information about that page (with the role of citations in academic publishing in mind). In his research project, nicknamed "BackRub", he was soon joined by Sergey Brin, a fellow Stanford Ph.D. student supported by a National Science Foundation Graduate Fellowship. Brin was already a close friend, whom Page had first met in the summer of 1995 in a group of potential new students which Brin had volunteered to show around the campus. Page's web crawler began exploring the web in March 1996, setting out from Page's own Stanford home page as its only starting point. To convert the backlink data that it gathered into a measure of importance for a given web page, Brin and Page developed the PageRank algorithm. Analyzing BackRub's output—which, for a given URL, consisted of a list of backlinks ranked by importance—it occurred to them that a search engine based on PageRank would produce better results than existing techniques (existing search engines at the time essentially ranked results according to how many times the search term appeared on a page). A small search engine called Rankdex was already exploring a similar strategy.
Convinced that the pages with the most links to them from other highly relevant Web pages must be the most relevant pages associated with the search, Page and Brin tested their thesis as part of their studies, and laid the foundation for their search engine. By early 1997, the backrub page described the state as follows:
Some Rough Statistics (from August 29th, 1996)
BackRub is written in Java and Python and runs on several Sun Ultras and Intel Pentiums running Linux. The primary database is kept on an Sun Ultra II with 28GB of disk. Scott Hassan and Alan Steremberg have provided a great deal of very talented implementation help. Sergey Brin has also been very involved and deserves many thanks.
-Larry Page email@example.com
Originally the search engine used the Stanford website with the domain google.stanford.edu. The domain google.com was registered on September 15, 1997. They formally incorporated their company, Google Inc., on September 4, 1998 at a friend's garage in Menlo Park, California.
Both Brin and Page had been against using advertising pop-ups in a search engine, or an "advertising funded search engines" model, and they wrote a research paper in 1998 on the topic while still students. However, they soon changed their minds and early on allowed simple text ads.
The name "Google" originated from a misspelling of "googol," which refers to the number represented by a 1 followed by one-hundred zeros (although Enid Blyton used the word decades earlier in "Google Bun" - Chapter IX, The Magic Faraway Tree). Having found its way increasingly into everyday language, the verb, "google," was added to the Merriam Webster Collegiate Dictionary and the Oxford English Dictionary in 2006, meaning, "to use the Google search engine to obtain information on the Internet."
By the end of 1998, Google had an index of about 60 million pages. The home page was still marked "BETA", but an article in Salon.com already argued that Google's search results were better than those of competitors like Hotbot or Excite.com, and praised it for being more technologically innovative than the overloaded portal sites (like Yahoo!, Excite.com, Lycos, Netscape's Netcenter, AOL.com, Go.com and MSN.com) which at that time, during the growing dot-com bubble, were seen as "the future of the Web", especially by stock market investors.
In March 1999, the company moved into offices at 165 University Avenue in Palo Alto, home to several other noted Silicon Valley technology startups. After quickly outgrowing two other sites, the company leased a complex of buildings in Mountain View at 1600 Amphitheatre Parkway from Silicon Graphics (SGI) in 1999. The company has remained at this location ever since, and the complex has since become known as the Googleplex (a play on the word googolplex, a number that is equal to 1 followed by a googol of zeros). In 2006, Google bought the property from SGI for $319 million.
The Google search engine attracted a loyal following among the growing number of Internet users, who liked its simple design. In 2000, Google began selling advertisements associated with search keywords. The ads were text-based to maintain an uncluttered page design and to maximize page loading speed. Keywords were sold based on a combination of price bid and click-throughs, with bidding starting at $.05 per click. This model of selling keyword advertising was pioneered by Goto.com (later renamed Overture Services, before being acquired by Yahoo! and rebranded as Yahoo! Search Marketing). While many of its dot-com rivals failed in the new Internet marketplace, Google quietly rose in stature while generating revenue.
Google's declared code of conduct is "Don't be evil", a phrase which they went so far as to include in their prospectus (aka "S-1") for their IPO, noting, "We believe strongly that in the long term, we will be better served — as shareholders and in all other ways — by a company that does good things for the world even if we forgo some short term gains."
 Financing and initial public offering
The first funding for Google as a company was secured in August 1998 in the form of a $100,000USD contribution from Andy Bechtolsheim, co-founder of Sun Microsystems, given to a corporation which did not yet exist.
In October 2003, while discussing a possible initial public offering of shares (IPO), Microsoft approached the company about a possible partnership or merger. However, no such deal ever materialized. In January 2004, Google announced the hiring of Morgan Stanley and Goldman Sachs Group to arrange an IPO. The IPO was projected to raise as much as $4 billion.
On April 29, 2004, Google made an S-1 form SEC filing for an IPO to raise as much as $2,718,281,828. This alludes to Google's corporate culture with a touch of mathematical humor as e ≈ 2.718281828. April 29 was also the 120th day of 2004, and according to section 12(g) of the Securities Exchange Act of 1934, "a company must file financial and other information with the SEC 120 days after the close of the year in which the company reaches $10 million in assets and/or 500 shareholders, including people with stock options." Google has stated in its annual filing for 2004 that every one of its 3,021 employees, "except temporary employees and contractors, are also equity holders, with significant collective employee ownership", so Google would have needed to make its financial information public by filing them with the SEC regardless of whether or not they intended to make a public offering. As Google stated in the filing, their, "growth has reduced some of the advantages of private ownership. By law, certain private companies must report as if they were public companies. The deadline imposed by this requirement accelerated our decision." The SEC filing revealed that Google turned a profit every year since 2001 and earned a profit of $105.6 million on revenues of $961.8 million during 2003.
In May 2004, Google officially cut Goldman Sachs from the IPO, leaving Morgan Stanley and Credit Suisse First Boston as the joint underwriters. They chose the unconventional way of allocating the initial offering through an auction (specifically, a "Dutch auction"), so that "anyone" would be able to participate in the offering. The smallest required account balances at most authorized online brokers that are allowed to participate in an IPO, however, are around $100,000. In the run-up to the IPO the company was forced to slash the price and size of the offering, but the process did not run into any technical difficulties or result in any significant legal challenges. The initial offering of shares was sold for $85 a piece. The public valued it at $100.34 at the close of the first day of trading, which saw 22,351,900 shares change hands.
Google's initial public offering took place on August 19, 2004. A total of 19,605,052 shares were offered at a price of $85 per share. Of that, 14,142,135 (another mathematical reference as √2 ≈ 1.4142135) were floated by Google and 5,462,917 by selling stockholders. The sale raised US$1.67 billion, and gave Google a market capitalization of more than $23 billion. The vast majority of Google's 271 million shares remained under Google's control. Many of Google's employees became instant paper millionaires. Yahoo!, a competitor of Google, also benefited from the IPO because it owns 2.7 million shares of Google.