Warren Buffett once said that if you're not prepared to own a stock for 10 years, you shouldn't think about owning it for 10 minutes. That's a prescription that might seem a bit daunting. Building a portfolio of stocks worth owning across decades is no easy task, and there's no paint-by-numbers approach that guarantees market-beating returns, but history suggests that a long-term approach to investing is the best way to put your money to work for you.

With that in mind, we asked three fool.com contributors to profile a stock that they think is on track to go the distance. Read on to see why they identified Walt Disney (DIS -0.45%)Alphabet (GOOG 0.37%) (GOOGL 0.35%), and Facebook (META 1.54%) as investments worth holding onto for at least the next two decades.

A clock next to a bag of gold coins.

Image source: Getty Images.

Moats and optionality are hard to beat

Keith Speights (Alphabet): Twenty years ago, Alphabet didn't even exist as a company. But I think you can count on Google's parent surviving and thriving over the next two decades. There are two criteria that are critical for stocks to enjoy long-term success, and Alphabet has both of them.

The first is a moat. The best-fortified castles in the Middle Ages had a wide ditch filled with water circling the entire structure. In a similar way, companies can have competitive advantages that give them the financial equivalent of a moat. 

Alphabet's moats include a tremendous market share and significant barriers to entry in key markets where the company operates. For example, Google's search engine websites enjoy a market share of 63%. Despite the entrance of a very well-funded rival search engine, Google's market share is actually higher than it was 10 years ago.

The second criteria for long-term success that Alphabet has in spades is optionality, or multiple avenues for generating growth. One way for the company to grow sales and earnings is by increasing advertising revenue made from the Google search engine, Gmail, Google Maps, Google Play, and YouTube. 

Alphabet's cloud infrastructure services also present a great opportunity for continued growth. The company is beginning to see some of its bets on smart-home products pay off. It's a leader in self-driving car technology. And that's just the tip of the iceberg.

I've personally invested in the stock and plan to hold it for the long run because Alphabet's moats and optionality are hard to beat.

Social media is the future

Nicholas Rossolillo (Facebook): Few things have become so ingrained into everyday life as quickly as social media. And at the top of that young but already massive industry sits Facebook.

The recent scandal involving Cambridge Analytica and the unauthorized access of 87 million of its users' data sent Facebook into a tailspin, and after making changes and pledging to refocus on connecting people, questions still remained for some. But there's no denying the power of Facebook. In the first quarter of 2018, revenue increased 49% and earnings per share jumped 63% from a year ago.

Monthly active users, a key metric in the network's growth, were up only 13% in the first quarter, though. The next quarter will be more telling, as it will have the user count during the height of Facebook's recent scandal. Also, because of its already massive size, Facebook management said revenue should decelerate for the balance of 2018.  CEO Mark Zuckerberg and other executives think all will be OK, though. Even if the flagship Facebook network struggles, the company also owns heavyweights Instagram, Messenger, and WhatsApp, and is broadening its reach with a new dating feature.

It's difficult to be an investor when times are uncertain. Yet, as history shows, such times are when fortunes are made. Facebook is proving it's durable, able to stand the test of time and controversy. I like the stock as a core holding for the indefinite future.

A lasting entertainment empire

Keith Noonan (Walt Disney): Disney will celebrate its 95th year in operation this October -- a stretch that has seen it leverage the magic of Mickey Mouse and other classic characters to build one of the world's powerful brands and a leadership position in the entertainment industry. 

Today, Disney's media franchises are stronger than ever -- even if the company once again finds itself needing to adapt to some big changes. Its media networks segment, which includes television channels like ESPN and ABC and accounted for 49% of operating income in the company's recently reported quarter, is facing pressure from cord-cutting. At the same time, the The House of Mouse must now contend with ascendant competitors like Netflix and Amazon in the original-content space. These are big challenges in some regards, but Disney isn't standing still and continues to have substantial advantages working in its favor.

The company's list of bankable media properties is unparalleled and too long to list here, with Star Wars, the Marvel Cinematic Universe, and the Pixar catalog representing just a sampling of the company's hit franchises. That's an advantage that should help Disney find success with its own streaming-video services, and the company's wealth of great franchises and knack for creating hit new content will likely continue to bolster its theme parks and merchandising segments as well.

Disney also pays a dividend, which makes owning the stock for the long haul even more enticing. Shares yield 1.6% at current prices, and the company's strong cash flows and commitment to payout growth in recent years suggest that shareholders can expect dividend increases.

The House of Mouse has delivered world-class returns for shareholders since going public in 1957, proving to be a resilient business that's shaped and adapted to the demands of its industry. That's a legacy that can get better with time. With a strong core business built around an unrivaled collection of entertainment properties, a growing returned-income component, and shares trading at less than 15 times this year's expected earnings, I think Disney stock is worth buying and holding for 20 years.