Amazon on Tuesday became the second publicly traded company to be worth $1 trillion, hot on the heels of iPhone maker Apple.

Amazon stock has increased almost 600 percent in the last five years, including a 70 percent surge so far in 2018 alone.

Launched as an online bookstore in 1995, Amazon.com has changed the way people shop for toilet paper, TVs and just about anything else. In its two decades, the company has expanded far beyond those bookseller beginnings, combining its world-spanning retail operations with less flashy but very profitable advertising and cloud computing businesses. It’s now expanding into the health care industry and increasing its brick-and-mortar presence.

The company’s rise has boosted the fortunes of its founder and CEO, Jeff Bezos: His 16 percent stake is now worth about $160 billion. Forbes magazine placed him at the top of its 2018 billionaires list for the first time, surpassing Microsoft co-founder Bill Gates and billionaire investor Warren Buffett.

Amazon stock has increased almost 600 percent in the last five years, including a 70 percent surge so far in 2018 alone. On Tuesday, the stock climbed enough to push the company’s valuation pass the $1 trillion mark, although it dropped back slightly after that.

Apple topped the $1 trillion mark in early August. Saudi Arabia’s national energy company, Aramco, is widely believed to be worth much more than either Amazon or Apple.

Bezos left a hedge fund job in 1994 to start an internet business. He decided to sell books, and called the company “earth’s biggest bookstore.” It quickly added more products, and then eventually opened up a marketplace where others could sell their products. Amazon has cemented customer loyalty through its Prime membership program, offering fast, free shipping as well as music and video streaming perks. In April, Bezos disclosed for the first time the company had more than 100 million paying Prime members around the world.

Wall Street has become very enthusiastic about the company’s other businesses. Amazon Web Services provides cloud computing services to companies and governments, and Amazon’s advertising division makes billions by selling ads to companies that want their products to show up when shoppers search on the site.

Those profitable businesses have helped offset the high costs associated with running its online store. Amazon saw its quarterly profit soar past $2 billion for the first time earlier this year as the online shopping, cloud computing and advertising businesses all kept growing.

More recently, the company has started to build up its physical presence. Last year’s purchase of the Whole Foods grocery chain gave Amazon hundreds of stores at which to promote its gadgets and offer discounts tied to Prime memberships. It has also formed partnerships with many old-line retailers, selling the Kenmore washing machines traditionally found at Sears and opening shops inside Kohl’s stores where people can bring returns and look at Amazon devices.

Amazon also has opened more than a dozen brick-and-mortar bookstores, and has plans for more cashier-less Amazon Go convenience stores.

It’s also has been looking for a while to find a way to have more control over how its packages are delivered. Under a program announced this summer, contractors around the country can launch businesses that deliver Amazon packages. The move gives Amazon more ways to ship its packages to shoppers without having to rely on UPS, FedEx and other delivery services.

The company is moving into health care. It has formed a venture with JPMorgan Chase and Berkshire Hathaway to figure out ways to attack rising health care costs for their U.S. employees and possibly for many more Americans. It also announced plans to buy the online pharmacy PillPack.

© The Associated Press. All rights reserved.