Image source: Getty Images.

E-commerce and cloud computing leader (NASDAQ:AMZN) and social network behemoth Facebook (NASDAQ:FB) have a lot in common. Both stocks have surged over the past three years, with Amazon up 186% and Facebook up 155%. Both companies are led by their founders, with Jeff Bezos at the helm of Amazon and Mark Zuckerberg leading Facebook. And both companies are now worth around $360 billion in the eyes of the market.

The growth opportunities for both Amazon and Facebook appear nearly limitless, and that got us to thinking. Will Amazon beat Facebook in the race to a $1 trillion valuation? Or will Facebook, a company founded just 12 years ago, leapfrog past the e-commerce giant? We posed this question to our followers on Twitter. Here are the results:

More than half of those who cast a vote expect Amazon to become a trillion-dollar company first, with 14% betting on Facebook and 28% believing neither company will ever reach that point. I don't doubt that both companies have a fighting chance of passing the trillion-dollar mark, but I'm not as optimistic as our Twitter followers on Amazon's prospects.

The race to $1 trillion

Amazon has shown an incredible ability to enter new businesses and turn them into major successes. There have certainly been failures along the way, but Amazon's willingness to take risks has paid off for the company. Amazon Web Services, the company's cloud computing arm, is nearing a $10 billion annual revenue run rate, becoming a transformative force in the IT industry despite the fact that it's not even Amazon's core business.

If Amazon reaches a $1 trillion valuation first, I think it will be driven by bets like AWS. Amazon is the dominant online retailer, but it will be tough to nearly triple its market capitalization anytime soon because of the retail business alone. Wal-Mart, which sells nearly $500 billion worth of products each year globally, is valued at just $220 billion. Costco, which generates a similar amount of revenue as Amazon, is valued at just $66 billion.

The hard truth about low-margin retailers is that they don't trade at very high multiples of sales. Wal-Mart is valued at about 0.46 times sales; Costco at 0.57 times sales. Meanwhile, Amazon trades at more than 3 times sales, a multiple that is almost guaranteed to contract as Amazon grows larger. Side bets like AWS are wildcards that could still put Amazon over the top. But the retail business is going to need to expand by a factor of 10 or more before a $1 trillion valuation would make much sense. Possible, but far from guaranteed.

Facebook is much smaller in terms of revenue, bringing in just $18 billion of revenue last year. There seems to be a good chance that Facebook ends up being the next Google, a tech company that dominates one very lucrative area. For Google, it's search. For Facebook, its social media.

The problem with betting on Facebook to be the first $1 trillion company is that it's impossible to predict what the company will even look like 10 years from now. Technology changes fast, and Facebook will face the challenge of remaining relevant as newer social media apps like Snapchat grow in popularity. Facebook has so far done a great job monetizing its platform, but reaching a trillion-dollar valuation will require a lot of things to go right for the company.

It's possible neither Amazon nor Facebook ever reaches a $1 trillion valuation, with both hitting a ceiling at some point in the future. It's also possible a different company reaches the milestone first. Alphabet is a possibility, as is Apple if the company is able to come up with a new product that matches the success of the iPhone. Warren Buffett's Berkshire Hathaway is a sleeper pick; the company's relentless compounding of its book value over the decades, even if it slows in the coming years, could put Berkshire over the $1 trillion mark within 10-15 years if things go right.

It's certainly possible that either Amazon or Facebook reaches a $1 trillion valuation first, but I think the odds are lower than the Twitter poll results suggest.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.