In this Monday, May 20, 2013, file photo, Yahoo CEO Marissa Mayer speaks during a news conference in New York. Not much had been going right for Yahoo until it lured Marissa Mayer away from Google to become its CEO last summer. The move is shaping up as the best thing to happen to Yahoo since 2005 when it invested $1 billion in Alibaba, a then little-known Internet company in China. (AP Photo/Frank Franklin II)

Not much had been going right for Yahoo until it lured Marissa Mayer away from Google to become its CEO last summer. The move is shaping up as the best thing to happen to Yahoo since 2005 when it invested $1 billion in what was then a little-known Internet company in China, Alibaba.

Mayer's magnetism and Alibaba's prosperity are now combining to transform Yahoo Inc. from a tale of woe into a comeback story that is winning over Silicon Valley and Wall Street.

People are spending more time on Yahoo's flagship website. Talented engineers and entrepreneurs are coming to work for the company. Investors are adding its long-languishing stock to their portfolios again. The signs of renewed interest and hope mark a dramatic change from the feelings of hopelessness that had enveloped Yahoo under the direction of six CEOs in the six years leading up to Mayer's appointment.

Yahoo's reversal of fortune will be in the spotlight Tuesday when the Sunnyvale, California, company releases its second-quarter financial results on the one-year anniversary of Mayer's surprise hiring from Google. Mayer, 38, had been a who played a key role in Google's evolution from startup to powerhouse.

Tuesday's results aren't expected to be anything special, but that probably won't matter as long as Mayer can keep convincing people that Yahoo is making steady progress after years of aimlessness.

Since her arrival, Mayer has orchestrated 17 acquisitions, including a $1.1 billion purchase of Internet blogging service Tumblr, Yahoo's biggest in a decade. Yahoo's home page, email and Flickr have all been redesigned, and a few have been upgraded, helping to increase use of the company's Internet services. And Yahoo's revenue is increasing, if ever so slightly, after three straight years of decline.

Despite all that, Mayer can't take much credit for Yahoo's resurgent stock. Most of the 75 percent increase in the shares has been driven by the rising value of the company's stake in Alibaba Group, which owns a network of bustling e-commerce and digital payment services in China.

"The performance of Yahoo's stock under Marissa has virtually nothing to do with what everyone associates with Yahoo—the U.S. operations," Macquarie Capital analyst Ben Schachter said. "We really haven't seen a significant change in the operations yet."

Mayer wasn't involved in the initial investment in Alibaba. Shortly after Mayer came on board, however, Yahoo realized a $7.6 billion windfall by selling roughly half of its Alibaba stake back to the Chinese company.

Investors have been pleased with what Mayer has done with the money. She has used most of the after-tax proceeds to buy back Yahoo's stock, a tactic that has funneled money back to them and boosted the company's earnings per share by reducing the amount of outstanding stock. Yahoo ended April with 1.08 billion outstanding shares, a decrease of 102 million, or 9 percent, from last July.

Yahoo still owns a 24 percent stake in Alibaba. Schachter estimates that could bring in another $20 billion when Yahoo sells the rest of its holdings. Some of the money is expected to come in when Alibaba makes an eagerly anticipated initial public offering of stock, expected by early next year. The rest would come some time after the Chinese company goes public.

That looming jackpot is the main reason that Yahoo's stock has climbed so much during Mayer's tenure. The run-up has occurred even though Yahoo has still been losing ground to Google and Facebook Inc. in the Internet ad market that generates most of their revenue. The trend is likely to surface once again in Tuesday's earnings report.

While Alibaba has boosted Yahoo's stock in the short term, Mayer is trying to set the stage for a comeback in the long term.

"As I've said before, companies with the best talent win, and it's clear we're now back in the game," Mayer declared during Yahoo's most recent earnings conference call in April.

Mayer, who declined interview requests through a spokeswoman, describes her turnaround plan then as a "series of sprints" that will take several years to finish. She believes she completed the first phase by improving employee morale at Yahoo and ending the three-year downturn in Yahoo's annual revenue.

It was a modest achievement, given that Yahoo's revenue increased by just 2 percent last year, after its ad commissions. The growth lagged the 15 percent increase in the overall U.S. digital advertising market last year, according to the Interactive Advertising Bureau. Facebook's revenue grew 37 percent over the same period, while Google's was up 21 percent, excluding revenue from last year's acquisition of Motorola Mobility.

Mayer is now focused on redesigning Yahoo's Internet services and improving its applications for smartphones and tablets in an effort to persuade people to check in more frequently and stay for longer periods of time.

The makeover of Yahoo's home page, in particular, appears to be winning over Web surfers. In May, the total amount of time spent on Yahoo.com in the U.S. rose by 36 percent from the same time last year, according to research firm comScore. That followed a 35 percent year-over-year increase in April and a 26 percent increase in March.

The increased usage gives Yahoo more opportunities to show ads, although Mayer has repeatedly warned it may be two or three more years until the company's revenue is keeping pace with the rest of the market.

S&P Capital IQ analyst Scott Kessler said that while Alibaba is the primary springboard for Yahoo's stock, some credit also belongs to Mayer for her ideas and the credibility she brought after spending 13 years helping to build Google into the Internet's most powerful company.

"Yahoo had been thought of as an also-ran and now it's a player again. A lot of that has to do with Marissa's presence," Kessler said. "She could have done just about anything she wanted, but she chose to become Yahoo's CEO, and that said a lot."

Mayer's pedigree also has helped persuade more startups to sell themselves to Yahoo, bringing along their expertise and innovations. Yahoo's 17 acquisitions under Mayer have mostly been deals so small that the company hasn't had to disclose the price that it paid. The one exception: the Tumblr purchase.

It's a $1.1 billion gamble that Yahoo might not have afforded, if not for the cash coming in from its propitious Alibaba investment.

That 2005 Alibaba deal was pulled off by two of Mayer's frequently maligned predecessors as Yahoo CEO, former movie studio mogul Terry Semel and company co-founder Jerry Yang. At that time, Yahoo was looking for a way to reduce its direct exposure to China while still retaining some exposure to what has turned into world's largest Internet market.

Alibaba has since blossomed into one of the world's fastest growing Internet companies with revenue last year of $1.8 billion, an 80 percent increase from 2011. Alibaba's earnings more than doubled last year to $642 million.

Semel was Yahoo's CEO at the time of the Alibaba investment. He resigned in 2007 under pressure from shareholders who were unhappy with Yahoo's deteriorating financial performance. He was succeeded by Yang, whose friendship with Alibaba founder Jack Ma and connections in China paved the way for the deal. Yang resigned as CEO in late 2008 amid shareholder outrage over a squandered opportunity to sell Yahoo to Microsoft Corp. for $47.5 billion, or $33 per share.

Not long after Microsoft withdrew its offer, Yahoo's stock fell into a deep funk that kept its price below $20 for more than four years. Now, it may not be much longer before Yahoo's stock surpasses the price offered by Microsoft. The shares closed Monday at $27.34, up from $15.65 when Mayer took over.

"In hindsight, the Alibaba investment was the single greatest creation of value that Yahoo has ever done," Schachter said.

Under Mayer: Boosting mobile, buying companies

Yahoo Inc. lured Marissa Mayer from Google in July to become its fifth CEO in as many years. Her task: Help the Internet pioneer regain its stature after years in a financial funk. In her first year leading the company, she has overseen a redesign of Yahoo services and orchestrated several acquisitions.

Here are some of the milestones on her watch:

— ALIBABA: In September, Yahoo completed a long-awaited, $7.6 billion deal for Chinese e-commerce group Alibaba to buy back nearly half of Yahoo's 40 percent stake. Most of the proceeds have gone back to shareholders, but Mayer has held on to some cash to pay for acquisitions, such as Yahoo's $1.1 billion acquisition of Internet blogging service Tumblr.

— MOBILE: Mayer has made mobile services one of her top priorities, as more people connect to the Internet on smartphones and tablet computers. During her tenure, Yahoo has created a new weather app for Apple's iPhone. It also has redesigned an email app for smartphones, as well as the app for its Flickr photo service on the iPhone and iPad. But in February, Mayer also said Yahoo will be better served with just 12 to 15 mobile applications, down from a "scattered" portfolio of as many as 75 different programs in recent years.

— WEB MAKEOVER: Yahoo unveiled a long-awaited redesign of its home page in February—the first in four years. The new approach has been getting people to visit more frequently and linger for longer periods of time. Yahoo said it has developed more sophisticated formulas to determine which topics are most likely to appeal to different people so the news feed can be fine-tuned to cater to different tastes.

— PERSONNEL: Ross Levinsohn, who was in charge of Yahoo's media and advertising services and served as interim CEO before Mayer's hiring, left the company last year. Software industry veteran Ken Goldman was named chief financial officer to replace cost-cutting specialist Tim Morse, who was hired in 2009. Alfred Amoroso stepped down as board chairman in April and left the board in June, becoming the eighth director to leave since early 2012. Maynard Webb Jr. is serving as Yahoo's interim chairman.

— STOCK PERFORMANCE: Mayer's efforts at Yahoo have been well-received on Wall Street, although most of the 75 percent surge in Yahoo's stock price under Mayer's leadership has been driven by the rising value of Yahoo's remaining 24 percent stake in Alibaba. Unlike Yahoo, Alibaba has seen its growth accelerate. That success has been steadily increasing Alibaba's estimated market value during the past year. Analysts believe Yahoo may be able to make another $10 billion to $20 billion, before taxes, when it sells the rest of its Alibaba holdings.

— ACQUISITIONS: Yahoo has bought 17 companies since Mayer took over as part of an effort to bring in better technology and obtain more engineering talent to help build better mobile applications. All of the deals have been relatively small, with the exception of Tumblr. Mayer is betting Tumblr will provide Yahoo with a captivating hook to reel in more traffic and advertisers on smartphones and tablet computers.