Just over two decades ago, Jeff Bezos started selling books online from his garage. Today, the Amazon CEO surpassed Bill Gates as the richest person on Earth, for a few hours at least.

Bezos's net worth topped $90 billion on Thursday morning, allowing the Amazon founder and CEO to dethrone Gates, the co-founder of Microsoft (MSFT), as the richest man in the world, according to Forbes and Bloomberg.

However, an afternoon dip in Amazon's stock price caused Bezos to slip back behind Gates, who has been No. 1 since 2013 on the Bloomberg Billionaires Index. Bezos finished the day worth $88.8 billion, just behind the $89.8 billion for Gates.

What's a billion dollars between the world's richest guys anyway?

Bezos has been hailed as the smartest guy in business for turning a bookselling platform into a disruptive force that has flipped traditional retail on its head.

His world's-richest-man milestone was made possible because of Amazon (AMZN)'s surging stock price. The e-commerce juggernaut's market value surpassed $500 billion this week for the first time ever.

The vast majority of the Bezos fortune is tied up in Amazon stock, of which the CEO owns nearly 17%. That stake alone is worth $83 billion, meaning Bezos could just as quickly lose his new title as the world's richest man should Amazon's stock decline, or Microsoft's value rise.

In recent years, Bezos's fortune has whizzed past that of legendary investor Warren Buffett, Spanish retail magnate Amancio Ortega and Mexican tycoon Carlos Slim. Bezos added more than $24 billion in net worth since January 2017, according to Bloomberg.

Related: Jeff Bezos is the smartest guy in business

Bezos founded Amazon in the mid-1990s from a garage, originally as an online bookseller. But over the years Bezos has deftly steered Amazon into hardware, cloud services, music and streaming shows. All along the way, Amazon used technology and sheer force to ruthlessly cut prices. Customers in turn have flocked to Amazon, which raked in a stunning $136 billion in sales last year alone.

The Amazon boss's bold vision was on full display again in June when he shocked Wall Street and the business world with a $13.7 billion purchase of Whole Foods (WFM). The surprise deal instantly made Amazon a major bricks-and-mortar player and sent a wave of fear through traditional grocery stores and food companies.

Bezos has used his fortune to purchase The Washington Post in 2013 and launch his own rocket company, Blue Origin.

Bezos is also thinking more about how to give back to society and even asked his Twitter followers last month for ideas.

"I'm thinking I want much of my philanthropic activity to be helping people in the here and now -- short term -- at the intersection of urgent need and lasting impact," Bezos wrote.

-- CNNMoney's Seth Fiegerman contributed to this report.