While most investors are hunting high yields, I prefer to put my cash into stocks that I believe will be successful for many years to come. Today's greatest companies weren't built overnight. Put to the test, Amazon.com (Nasdaq: AMZN) teaches us not to underestimate the value of long-term thinking. Here's why I think the stock is a buy today.

From books to bucks
The world's largest online retailer, Amazon is just getting started. At first glance, it may seem that the company's going in too many directions at once. But take a closer look and you'll see a lineup of innovative businesses ready to pop.

Amazon's come a long way from its days selling books online. In its latest quarter, Amazon failed to meet Wall Street's inflated expectations, but according to comScore, the e-tailer's growth more than doubled that of the broader market during the period.

Online shoppers in the U.S. will spend an estimated $327 billion in 2016, according to Forrester Research -- that's a 62% increase from $202 billion a year ago. Amazon's core business should continue to benefit from its lead position in this evolving e-commerce space. Meanwhile, I expect the company's Prime service to fuel future growth as well.

Amazon Prime is the company's gateway drug. The program entices customers to spend more (and more frequently) by offering free two-day shipping on an unlimited number of deliveries for just $79 a year. True, Amazon Prime is currently a drain on the company's balance sheet. However, the program is an investment in the e-tailer's future that will pay off down the road. In 2011, it expanded Prime to include unlimited streaming videos. To top things off, each of Amazon's new Kindle Fire tablets come with a free Prime trial -- hook, line, and sinker.

Amazon attracts hundreds of thousands of customers to its website every day. However, the stock's been dumped lately on worries that the business is burning through cash too quickly. Now, I'd agree if Amazon were blowing money on shoddy products or questionable acquisitions -- but that's not the case.

Not unlike Apple (Nasdaq: AAPL), the e-tailer is pouring cash into its massive media ecosystem. Apple's iTunes creates a network effect for the Mac maker that helps keep customers loyal to its brand. Similarly, Amazon's cloud lets customers download apps, songs, or books, and stream movies to their devices. Because these items are then stored in the cloud, users must keep using Amazon to access those purchases in the future.

By heavily investing in its infrastructure, Amazon is making the decision to value market share over short-term profit gains. This strategy will help the e-tailer triumph over competitors in the future. In my opinion, the stock is a buy today because it will only continue to climb higher from here.   

Too expensive?
Shares trade around $180, but don't let that fool you into thinking it's overvalued. There's no denying that Amazon's stock is expensive at roughly 67 times its forward earnings. But that's because the company is playing for the long haul.

There's also no doubt that Amazon is a volatile stock. Therefore, investors who are trying to time the market are better off sitting this one out. If you can invest for the next three to eight years, Amazon is a winning bet. Otherwise, follow my lead and add the stock to Motley Fool CAPS with a five year outperform rating.