What’s the takeaway lesson from the career of Marissa Mayer?

Marissa Mayer, now famous as the vastly successful CEO of Yahoo, was born in the small town of Wausau, Wisconsin, in 1975. She attended Wausau West High School and, after graduation, was selected by the governor as one of the state’s two delegates at the National Youth Science Camp. She went on to attend Stanford, where she went on to attain both her bachelor’s and master’s degrees.

Upon graduating from Stanford, Mayer had 13 jobs offers. Google was number 14. That was in 1999, and at that time, Google was not the giant that it is today – the company had only been founded the year before. It was a small startup with 19 employees. At first, she almost deleted the email. Then, she remember a suggestion from Eric Roberts, her long-time mentor from Stanford. The year before, Roberts had suggested that Mayer should meet with two students who had similar interests. Their names were Sergey Brin and Larry Page. Google was their company.

Prior to that offer, Mayer had been planning to take a job with the consulting firm McKinsey, which has major Silicon Valley companies as clients. It would have been a solid job. It would have offered better odds of success than a career with Google. Mayer actually took the time to determine that numerically – she put together the relevant data and figured that Google had around a 2 percent chance of success. Taking the Google job would be a huge risk.

She took it anyway.

Mayer explained what tipped the scales in favor of Google in her decision-making process: “The turning point for me was realizing that I would learn more at Google, trying to build a company, regardless of whether we failed or succeeded, than I would at any of the other companies I had offers from.”

Mayer started as a programmer at Google and eventually rose to the rank of senior vice president. During her time at Google, Mayer took another risk – she started dating Google co-founder Larry Page. That was a risk that did not pay off quite as well – but ultimately it opened the door to other opportunities.

When Google went public in 2004, Mayer suddenly became worth millions. Her star was clearly on the rise as she exercised her considerable power in an increasingly powerful company. It seemed clear that her star was continuing to rise until the end of 2010, when she was demoted rather unexpectedly. Perhaps not coincidentally, though, her demotion coincided with Larry Page’s return to CEO-ship of the company. Although Page and Mayer had dated for a little while, by 2007 Page married someone else and in 2009 Mayer did the same.

Some at Google speculate that the erstwhile relationship had nothing to do with the way in which Mayer’s career suddenly stalled at Google – but the timing is uncanny. Nonetheless, some say that her lack of interest in the business side of the company is what hurt her Google career. Mayer was solely design-focused – because that was her job. However, the further she advanced in management, the more that an interest in the business side of things became necessary.

But, instead of sputtering out with a stalled career at Google, Mayer moved on to a better position in one of Google’s competitors – Yahoo. After some major turnover at the top, Yahoo found itself in the market for a new CEO. On the short list were interim CEO Ross Levinsohn, Google’s Chief Business Offcer Nikesh Arora, Apple’s Senior Vice President of Internet Software and Services Eddy Cue, and then-CEO of Hulu Jason Kilar. Also, of course, there was Marissa Mayer.

Although Mayer would be moving up by taking a CEO position, it was still a risk in certain respects. First of all, Yahoo had been in a 10-year slump. Second, Mayer didn’t do the business end of things – and as a CEO she’d need to figure out how to do so, and quickly. Finally, Mayer was seven months pregnant by the time she walked in the front doors of Yahoo as its new CEO. Although she had told the board of directors, she was taking a huge risk in attempting to take on so many more responsibilities during the third trimester of pregnancy. Many women may not have been able to handle it – but Mayer could.

In fact, she handled it with aplomb. Within the first few weeks, she completely revamped the corporate culture at Yahoo, creating a more energetic and dynamic environment. She redesigned products, decided to acquire Tumblr, and nearly doubled the company’s stock price. During all this, Mayer became the first person ever to give birth while being CEO of a Fortune 500 company.

So what’s the takeaway lesson from the career of Marissa Mayer? Take risks. Even if they don’t pay out, they may open the door to something even better.