Trading in and out of stocks may be exciting, but it's no way to build wealth. Buying shares of high-quality companies and holding on for the long haul is a far better alternative.

We asked three of our Foolish investors to each discuss one stock worthy of being bought and held for decades. Here's why they chose Pfizer (PFE 0.19%), Canadian National Railway (CNI 0.27%), and Berkshire Hathaway (BRK.B -0.74%).

An hourglass with money raining around it.

Image source: Getty Images.

Dividends and durability

Keith Speights (Pfizer): Some stocks are like microwave ovens. They heat up quickly, but cool down just as fast. Other stocks are more like Crock-Pots. They're best left to simmer for a long period of time, with the end result being worth the wait. Pfizer definitely belongs to the latter category.

Pfizer has been around longer than most stocks on the market today, with the company beginning operations way back in 1849. Over the long run, the big-pharma stock has been a huge winner for investors who bought and held. That's especially true for those who reinvested dividends. An initial $10,000 investment in Pfizer stock 40 years ago, with dividends reinvested, would be worth more than $1.5 million today. 

Dividends are still a key part of the investing premise for Pfizer, with the yield currently standing at nearly 3.8%. And while the drugmaker faces some headwinds as several products lose exclusivity, the long-term future for Pfizer appears to be bright.

Pfizer ranks third among all big-pharma companies in investing in research and development. The company's pipeline includes 32 late-stage programs. In addition, Pfizer awaits regulatory approval for 10 other programs.

Pfizer might not generate the turbocharged level of growth as some stocks. But with its attractive dividend and ability to keep producing more successful drugs, Pfizer looks to be one of the better buy-and-hold stocks around.  

On the right track

Danny Vena (Canadian National Railway): Canadian National Railway is a best-in-class railroad and one of the premier dividend-growth stocks available. Its economic moat is matched only by the 21,000 miles of tracks that stretch from coast to coast. This little-engine-that-could has been generating impressive growth, up over 30% in the last 12 months. Its dividend currently yields 1.5%, with a payout ratio of only 30%, leaving plenty of room for future growth.

A recent expansion and upgrades to the Port of Prince Rupert, to which Canadian National has exclusive rights, has resulted in Canada's second-largest container terminal, increasing its annual capacity by 59%. Canadian National has pointed to this as a major growth driver over the next several years, and analysts have identified it as one of the company's "most prized corridors for growth." Geographically, it's the closest North American port to Asia, and has become a major destination for shipments to and from the region as it reduces shipping times by several days compared to other West Coast locations. 

Canadian National, which is already North America's most efficient railroad, plans further investments, spending $2.6 billion to upgrade tracks and acquire 22 new locomotives. 

In the most recent quarter, Canadian National grew revenue by 17% year over year, while net income increased 20% and free cash flow grew 39% over the prior-year quarter. These results were driven by revenue ton-miles -- the number of tons moved times the number of miles -- which grew 18%, while carloadings increased by 14%.

All aboard!

The best buy and hold stock

Tim Green (Berkshire Hathaway): You could buy an S&P 500 index fund, paying nearly 25 times trailing-12-month earnings, or you could buy shares of Warren Buffett's Berkshire Hathaway, a collection of businesses and investments that has historically trounced the market, for about 20 times earnings. It seems like a no-brainer to me.

Berkshire has expanded its per-share book value, or assets minus liabilities, by 19% annually since 1965. The stock price has grown by 20.8% annually over that time. In contrast, the S&P 500, including dividends, has compounded at only a 9.7% annual rate.

This gap is almost certain to shrink in the coming years, given Berkshire's size. Valued at roughly $440 billion, the company will eventually run out of ideas big enough to move the needle. That may already be happening, with Berkshire sitting on nearly $100 billion of idle cash.

You shouldn't expect Berkshire stock to double the market from here on out. But you can view Berkshire as almost like an index fund, comprised of a large number of diversified companies and investments. The key difference is that Buffett has a knack for investing only in companies that maintain a durable competitive advantage. Over the coming decades, this pickiness should allow Berkshire to continue to perform well, even if it doesn't match its historical performance.