Share story

SAN FRANCISCO — As the digital-advertising market booms and demand for smartphones wanes, Alphabet could soon dethrone Apple as the world’s most valuable company.

If it happens, Alphabet will move to the head of the class just five months after Google reorganized itself under the holding company.

The Silicon Valley rivals could trade places soon, given how rapidly the financial gap between them is narrowing. At the end of trading on Friday, Apple’s market value stood at $540 billion; Alphabet was worth $524 billion.

That’s a dramatic swing from where things stood just 13 months ago. Apple then boasted a market value of $643 billion, almost twice Google’s $361 billion.

Since then, investors have soured on Apple. The company has struggled to come up with another trendsetting product amid slumping sales of its most important device — the nearly 9-year-old iPhone, which accounts for roughly two-thirds of Apple’s overall sales.

Apple has already acknowledged the iPhone will begin this year with its first quarterly sales decline since it debuted in 2007. The slowdown helped push down Apple’s stock price by 12 percent since the end of 2014.

In contrast, Google has maintained its leadership in the lucrative Internet search and ad market while building other popular products in video, mobile, Web browsing, email and mapping. That bundle of Google services brings in most of Alphabet’s revenue, and is expected to deliver growth in the 15 to 20 percent range as marketers shift even more of their budgets to digital services.

Alphabet also has impressed investors by reining in its spending. Google hired a Wall Street veteran, Ruth Porat, as its chief financial officer last May.

In addition to reversing a long expansion of Google’s operating expenses, Porat also persuaded Alphabet’s board to spend $5 billion buying back its own stock. That move signaled a more shareholder-friendly approach to managing the company’s cash hoard.

Investors also have applauded the creation of Alphabet, which is structured to provide more information about the cost of the company’s experimental ventures into self-driving cars, Internet access services, health science and city management.

All of those factors have helped lift Alphabet’s stock — previously Google’s — by 43 percent since the end of 2014.

It’s a potentially big shift for Apple, which has held bragging rights as the world’s most valuable company for most of the past four-and-a-half years. (ExxonMobil seized the high ground for a brief time in 2013.)