Amazon mogul Jeff Bezos could lose his title as world’s richest man to the guy who held it for two dozen years – his Seattle-area neighbor Bill Gates – after the e-commerce giant’s lower-than-expected third-quarter results thumped its shares.

Amazon stock fell more than 8% after hours Thursday, to $1,624, after the e-commerce giant reported its first quarterly drop in profit since 2017. That shaved Bezos’s net worth by nearly $7 billion, to $103.9 billion, according to the Bloomberg Billionaires Index, bumping him behind the Microsoft founder’s $105.7 billion. Bloomberg’s ranking updates after market close, so the switch won’t be official until trading closes Friday.

Shares closed Friday at 1761.33, nearly 1.1% lower than Thursday’s close.

Bezos has been the world’s wealthiest person since 2017, when his net worth soared to $160 billion to end Gates’s 24-year run in the top slot. The potential change in Bezos’s status is partly tied to his transferring a quarter of his Amazon stake – worth roughly $36 billion – to MacKenzie Bezos under a divorce settlement finalized earlier this year. The agreement made her one of the 20 richest people in the world.

Granted, these rankings are ultimately a paper chase, as the numbers are sure to fluctuate and likely do not account for all their assets. Bezos also owns The Washington Post, aerospace company Blue Origin, and has extensive real estate holdings.

Gates could very well have kept a stranglehold on the title were it not for his robust philanthropy: he’s given away about a quarter of his net worth over the years, according to Forbes. Since stepping back from Microsoft in 2014, Gates has dispensed with all but 1% of his shares in the company, according to Forbes. And he’s given more than $35 billion to the Bill & Melinda Gates Foundation, which he chairs with his wife, since 1994. It is the largest private charitable foundation in the world.

Microsoft is the world’s most valuable company, with a market capitalization in excess of $1 trillion. The company’s bet on cloud computing, which allows its customers to rent computing power from Microsoft rather than buying their own, has paid off, fueling a 21% increase in profits this quarter. But it still lags behind Amazon, which essentially created the market with Amazon Web Services.

Amazon’s third-quarter earnings disappointed Wall Street on Thursday as the retailer’s investment in expedited shipping cut into its profits, which are down more than 25% from a year ago at $2.1 billion. The company’s worldwide shipping costs spiked 46% from the previous year to $9.6 billion, and Amazon expects to spend $1.5 billion on one-day shipping in the fourth quarter, Chief Financial Officer Brian Olsavsky said in an earnings call Thursday.

Before the earnings report, Amazon stock had surged nearly 16% this year. It’s currently worth more than $858 billion.