These are companies you might lock up for a while. Photo: Jason Baker, Flickr

Only buy something that you'd be perfectly happy to hold
if the market shut down for 10 years.
-- Warren Buffett

Super investor Warren Buffett isn't just being cute there -- he means it. He has made many billions of dollars by buying entire businesses -- as well as large stock stakes -- and hanging on to them for many years -- and even decades. Of course, not all of them turn out well. But the winners more than make up for the losers.

You might do even better in your investing if you think of it more as "buy to hold" than "buy and hold." The difference reflects that you shouldn't just buy and forget what you own, instead keeping up with your holdings in case any of them suffer a significant change in their potential.

So which stocks, exactly, can you buy to hold for a decade or more? Well, everyone's needs and preferences are different, but here are three portfolio contenders for you.

Berkshire Hathaway owns an entire railroad, among many other things. Photo: Prayitno, Flickr.

Berkshire Hathaway
Let's start with Warren Buffett's own company, Berkshire Hathaway (NYSE:BRK-A) (NYSE:BRK-B). Despite the fact that it's not a household name (yet), it's one of the largest companies in America, with a market cap recently topping $300 billion. (Yes, that's more than General Electric, Procter & Gamble, or Johnson & Johnson.) It's a great long-term portfolio candidate because of its great diversification and the defensiveness of many of its holdings, such as insurance and utilities. When the economy is struggling, Berkshire stands to get bigger, as some competitors lose, or go out of business, and Berkshire has also been known to profit by lending money to ailing companies.

Berkshire is a strong cyclical performer, too, owning businesses such as home builders, furniture retailers, paint, jewelry, private jets, and an entire major railroad. A decade from now, Berkshire is likely to encompass more companies.

There's a chance that during the coming decade, Warren Buffett will no longer be helming the company -- he's 85, after all -- but though such a transition might cause the stock price to falter, it's likely to be a temporary event. It's not going to stop all the Berkshire companies from chugging along, though, generating billions in profits each year.

Berkshire stock is attractively priced these days, with its recent and forward-looking price-to-earnings (P/E) ratio well below its five-year average. Better still, its recent price-to-book ratio of 1.2 is roughly at the point at which Buffett himself has said he'd consider repurchasing shares.

Wells Fargo
Wells Fargo (NYSE:WFC) is another relatively stable giant, with a market cap recently approaching $250 billion -- and a generous dividend that recently yielded 3.1%. More than 160 years old, Wells Fargo is now one of the world's biggest banks, with close to $2 trillion in assets, offices in 36 countries, roughly 8,700 locations, 12,000 ATMs, and more than a quarter of a million employees.

Wells Fargo is also one of America's best-performing banks and healthiest banks. Indeed, the folks at Morningstar recently named  its CEO, John Stumpf, "CEO of the Year" for 2015, citing his sound stewardship of the company through the turbulent times following the credit crisis -- its dividend is now higher than it was pre-crisis -- and how he has managed the company conservatively, with more underwriting discipline than many peers.

Its fourth quarter featured commercial and industrial loans growing by 10% year over year, mortgages growing by 8%, car loans rising by 8%, and credit card loans by 9%, among other debt. Deposits grew by 6%.

The bank's efficiency ratio has been falling, too (which is good) -- from 61% in 2011 to roughly 58% in 2015. With a very high credit rating of A+ from Standard & Poor's, the company can pay less to borrow money, giving it an advantage over many peers.

On top of all this, the stock is appealingly priced, with its recent and forward-looking price-to-earnings (P/E) ratios below its five-year average, and its price-to-book-value ratio below average, as well.

Long lines on weekends don't keep shoppers away from Costco. Photo: Ines Hegedus-Garcia, Flickr.

A third company to consider for the very long term is megaretailer Costco (NASDAQ:COST). It's big -- with a market cap recently near $65 billion -- and getting bigger. Its revenue has nearly doubled over the past decade, with its profit margins rising throughout the period, too. That's especially impressive, given that the company limits its product markups to no more than 15%.

Costco has earned high marks for how it treats not only its customers -- such as via the mark-up cap -- but also its employees and shareholders. Shareholders have enjoyed an average annual growth rate of 12% over the past 25 years, well above the S&P 500's 7%.

The stock offers a dividend, too. It recently yielded just 1%, but it has been increased aggressively, rising by an average annual rate of 13% over the past decade. With its payout ratio below 30, there's plenty of room for more growth.

Costco is a well-regarded employer, paying workers at above-average rates compared with rivals, and generating more than twice as much revenue per employee. Satisfying customers, employees, and shareholders alike is a great formula for success. It seems to be working for Costco, as the company has been ramping up its capital spending and expansion, planning to open 32 new warehouses in 2016. 

The main knock against Costco for investors is that it's not quite a screaming bargain at recent levels -- but it's not too far from its five-year averages for its P/E ratio, price-to-sales ratio, and price-to-cash-flow ratio. In other words, you might just watch it, waiting for a pullback in price, or you might start a bit of a position now.