Yahoo! Inc. (Nasdaq: YHOO) Chief Executive Officer Marissa Mayer stands to receive as much as $59 million in compensation over the coming years after agreeing to leave Google Inc. (Nasdaq: GOOG) to run the troubled Web portal.

The total includes $3 million in salary and potential bonus and $12 million in restricted stock units and stock options, according to a filing today with the U.S. Securities and Exchange Commission. She is also set to receive $30 million in one-time retention awards and $14 million to make up for stock- based compensation she would have received at Google.

Mayer, 37, took the helm July 17, the day Yahoo reported second-quarter sales that were little changed from a year earlier. The results underscored the challenge Mayer faces as the fifth CEO in three years who’s attempting to revive growth at Yahoo. The company lags behind Facebook Inc. and Google in luring the online advertising that makes up most of sales.

“You have to build in sort of a risk premium,” said David Larcker, a professor at Stanford University’s Graduate School of Business. “She has to change the strategy and redeploy assets – – make it work. And she’s a very well-known person, aggressive, successful. You’re going to have to pay a sizable wage.”

Mayer will juggle her role as CEO with being a new mother. She said on her Twitter page that she and her husband, Zachary Bogue, are expecting a baby boy.

Past Yahoo Pay

Yahoo set Scott Thompson’s potential compensation as high as $27 million before he stepped down in May over inaccuracies in his resume. Carol Bartz, his predecessor at the Sunnyvale, California-based company, stood to earn about $10 million during her last year on the job. She was fired in September amid frustration among investors such as Daniel Loeb over her handling of strategy.

Mayer followed Ross Levinsohn, who ran Yahoo on an interim basis after Thompson resigned.

Yahoo edited language in its offer letter since the one it gave Thompson in January. Mayer’s requires her to affirm that “all information provided to Yahoo! or its agents with regard to your background is true and correct,” while Thompson’s stated only that the offer is contingent on a background check.

Google Compensation

Google Inc. never disclosed Mayer’s compensation during her 13-year career at the Internet search leader.

But Mayer struck it rich when Google went public in 2004. She joined Google in 1999 as its 20th employees and accumulated stock options that yielded a jackpot the company’s stock soared from its initial public offering price of $85 to nearly $750.

Nailing down a precise value of Mayer’s Yahoo pay package is difficult because so much of the compensation is tied to her ability to lift Yahoo Inc.’s sagging stock. She could pocket a much larger windfall if Yahoo’s shares soar during her tenure or make less if the stock remains in a funk.

The estimated value of executive pay packages can also be calculated in dramatically different ways. After factoring in future grants of restricted stock and stock options due Mayer under her employment agreement, Yahoo said her annual compensation will be worth about $20 million annually, or about $100 million during the next five years that the company hopes to retain her as CEO.

The typical CEO of a public company in the U.S. made $9.6 million last year, according to an analysis by The Associated Press using data from Equilar, an executive pay research firm.

Yahoo’s previous — and short-lived — CEO, Scott Thompson, had a $27 million pay package. Thompson’s salary and bonus were the same as Mayer’s, but Yahoo dangled more incentives to lure her away from Google to become Yahoo’s fifth CEO in five years.

Thompson stepped aside in mid-May amid an uproar over misleading information on his resume. Other Yahoo CEOs stepped aside or were shoved aside after failing to revive the company’s revenue growth.

Yahoo is counting on Mayer to bring the same drive, managerial skills and knack for innovation that she displayed while helping Google build some of its most popular products.

(Bloomberg and The AP contributed to this report.)