So why did Ms. Mayer receive more than $900,000 a week? The answer, like so many things about Yahoo, is surprisingly complicated. It is rooted partly in the never-lose structure of modern executive compensation packages, but also in two farsighted investments made long ago by one of Yahoo’s founders, Jerry Yang.
By Wall Street’s most basic yardstick — Yahoo’s stock price — Ms. Mayer earned every penny she got. Yahoo’s share price more than tripled during her tenure. After the $4.5 billion sale to Verizon, shareholders will still own an investment company with $57 billion of stock in two Asian internet companies, Alibaba Group and Yahoo Japan.
Ms. Mayer’s pay was mostly in stock and stock options, and she reaped the rewards alongside the other stockholders.
“The only sign you can point to when evaluating a company over a long period of time is how shareholders have done in the exchange,” said David Wise, who heads North American sales at Korn Ferry Hay Group, a firm that advises companies on executive pay packages. “Over the last five years, Yahoo shareholders couldn’t have done a lot better than this.”
More than most chief executives, Ms. Mayer was working for those shareholders.
She was essentially hired by one hedge-fund manager, Daniel S. Loeb, who got her predecessor fired and won three seats on Yahoo’s board in 2012. Mr. Loeb was particularly interested in finding a way to unlock the value of Yahoo’s stake in Alibaba, which was already shaping up to be one of China’s leading internet companies. He pushed the board to recruit a star like Ms. Mayer to get people excited about a company that had been stumbling for years.
When Ms. Mayer’s early efforts to turn around Yahoo’s business and spin off the Alibaba shares failed to bear fruit, another hedge fund manager, Jeffrey C. Smith of Starboard Value, led a campaign to push for her ouster. Mr. Smith eventually garnered four board seats so he could keep the pressure on.
Yahoo declined to comment for this article, citing this coming Thursday’s shareholder vote to approve the Verizon deal. Ms. Mayer and the board chairman, Maynard Webb, who approved her pay packages, also declined interview requests. So did Mr. Smith.
Ms. Mayer has come under more scrutiny than most Silicon Valley chief executives, in part because of the Superwoman image she cultivated in an industry dominated by men: the Stanford-trained computer scientist and tireless manager who still wrote code for fun while raising three young children and looking stylish in Oscar de la Renta.
“She was an attractive, high-visibility C.E.O. trying to bring some excitement and glamour to Yahoo,” said Martha Josephson, a senior partner at the recruiting firm Egon Zehnder, who helped Ms. Mayer find several of her top executives. “As hard as the job was, she didn’t get a break. If she were an ugly man, she’d be a hero.”
On July 16, 2012, the day she was hired, Yahoo’s share price was $15.65. On Friday, it closed at $50.60. The stock’s performance has topped other venerable tech companies like Microsoft, Oracle and Cisco Systems, and matched the gains of Alphabet, the parent company of Google, Yahoo’s most direct competitor.
As Yahoo shareholders profited, so did Ms. Mayer. By the time the deal closes, she will have made about $239 million, based on Friday’s share price, according to calculations by Equilar, a provider of executive compensation data.
Such stock-heavy compensation structures are the norm in corporate America, where boards of directors seek to align an executive’s financial incentives with gains for shareholders.
To lure Ms. Mayer from Google and compensate her for options she forfeited there, Yahoo’s board offered her a lucrative employment agreement. She initially received restricted stock worth $35 million and stock options worth $21 million, based on 2012 stock prices for Yahoo, along with a cash salary and bonus. Although she gave up a portion of those stock grants after failing to meet performance targets, the rise in Yahoo’s share price more than offset the losses. She received further stock grants in later years, adding to her overall compensation.
Yet most of Ms. Mayer’s paycheck ultimately came from the gains in Yahoo’s Alibaba and Yahoo Japan investments, over which she had little control. Thanks to an investment made in 2005, Yahoo had a 24 percent stake in Alibaba, which today is China’s leading e-commerce company.
When Alibaba first sold shares to the public in 2014, Yahoo sold 140 million shares in the offering. It hung on to 384 million shares, which are now worth about $48 billion.
Yahoo also owns about 36 percent of Yahoo Japan, now worth about $9 billion, that it received as part of a deal struck in 1996, shortly after Yahoo was founded.
The surging value of those investments — not any brilliant business moves by Ms. Mayer — is why Yahoo’s shares went up. “It’s like someone coming into an oil company, and all of a sudden oil prices go up and the stock goes up,” said Charles M. Elson, the director of the Weinberg Center for Corporate Governance at the University of Delaware. “Was the return based on what she did?”
Still, managing those investments was a key reason that Yahoo’s board hired Ms. Mayer. Mr. Loeb had accused Yahoo’s previous leaders of mishandling both their core business and the Alibaba relationship. When he and two allies gained seats on the board in 2012, they wanted a new chief executive who would fix both problems.
Ms. Mayer delegated the Alibaba issue, hiring an experienced dealmaker, Jacqueline Reses, to be the company’s principal liaison to Alibaba and its leaders, Jack Ma and Joseph Tsai. Ms. Reses helped the Chinese company navigate its initial public offering. She also renegotiated an agreement, struck just before Ms. Mayer arrived, that would have forced Yahoo to sell an additional 122 million shares in the offering. Those extra shares are now worth $15 billion.
Ms. Mayer, meanwhile, focused on turning around Yahoo’s internet business. It had missed the mobile revolution and was experiencing steady declines in its display and search advertising. There, her record is decidedly mixed.
Yahoo had no real strategy for reaching customers on mobile devices when she arrived — a sure route to obsolescence as smartphones became the principal internet device for most people.
Through a combination of acquisitions and hiring, she vastly expanded Yahoo’s mobile team, which initially produced some buzzy hits like the Yahoo Weather app and Yahoo News Digest, along with more prosaic updates of core Yahoo features like fantasy sports and email. Yet Ms. Mayer largely failed in her quest to make Yahoo a “daily habit” for more users in online video, search and messaging.
Ms. Mayer also made a bold bet on social media, buying the money-losing blogging site Tumblr for $1.1 billion in 2013. But she did little with the acquisition and was eventually forced to write down much of the purchase price.
One of her biggest mistakes was hiring a former colleague from Google, Henrique de Castro, to be chief operating officer and oversee Yahoo’s advertising efforts. But Ms. Mayer fired him just 14 months later, resulting in a $58 million severance payout. All told, he received about $108 million, according to court documents. Two lawsuits have sought to recover some of that money, arguing that Ms. Mayer and the board overpaid him and failed to protect shareholders’ interests.
Ms. Mayer, who oversaw search at Google, also assigned more than 1,000 people to Yahoo’s search products, which it had largely abandoned in 2009 when it sold its search operations to Microsoft. The team was asked to pursue her great white whale: a personalized search product that could leapfrog Apple’s Siri, Google’s Assistant and Microsoft’s Cortana. Little came of the effort.
Yahoo did acquire advertising technology and built a new ad system from scratch, but marketers never embraced it.
Yahoo’s board recognized Ms. Mayer’s failure to meet business targets and docked her bonuses and stock awards in four of the five years she was in charge. But under terms of her original employment agreement, it also granted her new shares annually, easing the sting.
The biggest financial price she paid for her mistakes came this year, when she gave up her cash bonus for 2016 and equity awards for 2017 — about $14 million — as a penalty for management’s failure to act on evidence of the theft of data from 500 million accounts in 2014. That incident, along with the 2013 breach of one billion accounts, prompted Verizon to renegotiate its original purchase agreement with Yahoo, shaving $350 million from the $4.83 billion price.
Even Ms. Mayer’s handling of the Alibaba investment came in for second-guessing. Yahoo spent so much time devising its original plan to spin off the stake in a tax-free transaction that the Internal Revenue Service changed its views on such deals, forcing the company to start over.
Given those missteps, was Ms. Mayer overpaid?
“For the existing amount of compensation, could Yahoo shareholders have done better?” Mr. Wieser of Pivotal Research said. “Or for the same outcome, could they have paid less? Ultimately it’s a hard question to answer.”
Peter Monaco, who was a vice president for engineering at Yahoo for three years before leaving for Facebook last September, said Ms. Mayer does not get enough credit for transforming Yahoo’s culture. “She eliminated the dead wood, drove out the politics, put in place compensation policies that rewarded high achievers and energized people to create great products again,” he said.
Arguably, Yahoo was unfixable. The company’s DNA and technology were built around its original identity as a web portal — a powerful position in the early 2000s but increasingly outmoded in the mobile era, as apps and phone platforms like iOS and Android became the gateways to the internet.
“Given the hand she was dealt, I doubt anyone could have done a better job transforming the culture and making Yahoo healthy again,” Mr. Monaco said.
Ms. Mayer, who once made the grueling trek to the top of Mount Kilimanjaro, Africa’s highest peak, said last year that fixing Yahoo was like climbing a mountain. “It’s a tall mountain to climb and we started, obviously, very low on the mountain,” she told Charlie Rose.
Unlike Kilimanjaro, though, the Yahoo challenge proved insurmountable.