Photo: Mike Mozart, Flickr

If you're in the market for some great stock ideas for your portfolio, it makes sense to wonder what the smartest and most successful investors own. There are few -- if any -- investors smarter or more successful than Warren Buffett, whose Berkshire Hathaway (NYSE:BRK-A) (NYSE:BRK-B) has averaged annual gains topping 18% for 30 years. That's enough to turn a single $1,000 investment into more than $140,000!

Wal-Mart Stores (NYSE:WMT) is one of the biggest Warren Buffett stocks. Let's see if it's worth buying, too.

Berkshire Hathaway is an unusual company, as it's primarily engaged in insurance -- think GEICO, for example. It also owns a lot of stock in public companies, as well as many companies in their entirety, such as Dairy Queen, Benjamin Moore, Fruit of the Loom, and the Burlington Northern Santa Fe, or BNSF, railroad.

It's easy to see what Berkshire's top stock holdings are because Buffett reviews them in his annual letter to shareholders. His last one, for 2013, shows that Berkshire's Wal-Mart holding is its fifth largest, valued at year end at roughly $4.5 billion. (He began building the position in 2005.)

Buffett has more than just bought stock in Wal-Mart. In 2003, he bought an entire business from it for $1.5 billion. It was McLane, "one of the nation's largest wholesale distributors of groceries and nonfood items to convenience stores, wholesale clubs, mass merchandisers, quick service restaurants, theaters and others."

It's not too hard to guess why he would buy shares of the $245 billion retailer. He likes big companies that are relatively easy for him to understand, and ones whose futures he can estimate. He probably believes, for example, that five or 10 years from now, Wal-Mart will still be a dominant retailer. The retailer's free cash flow of more than $11 billion per year is also appealing, and its dividends generate more than $111 million for Berkshire each year.

Why might you buy Wal-Mart?
Buffett's reasoning holds true for us smaller investors, too. The company's dividend recently yielded a solid 2.5%, and Wal-Mart has been hiking that payout by an annual average of 14% during the past decade. Better still, its payout ratio is only 39%, suggesting plenty of room for further aggressive hikes.

You might also like that the company is not standing still, but is continuing to expand around the world, and even to find places to expand in the U.S. where it doesn't already have a major presence. For example, its new "Neighborhood Markets" feature a much smaller footprint and fewer products, and are taking aim at local grocery stores, pharmacies, and dollar stores.

Also in development are "Walmart to Go" convenience-store-like locations. Wal-Mart is also going after more online shopping dollars, with a redesigned website and a build-out of more e-commerce-dedicated fulfillment centers across the country.

With its deep pockets and prodigious free cash flow, Wal-Mart is able to pursue many avenues for growth. If you have faith that it's coming up with sound strategies, then there's plenty of cause for optimism.

Photo: Daniel Ng, Flickr.

Why might you not buy Wal-Mart?
Wal-Mart isn't for you if you're seeking rapid growth, though. It's hard for large companies to grow fast, and Wal-Mart is more than large.

One way that the company has been fueling its earnings-per-share growth is by reducing its number of shares through buybacks. Since 2005, it has reduced its share count by a whopping 24%!

You can't keep reducing your share count forever, though, and fewer shares will have no affect on a company's top line. Wal-Mart's revenue has averaged 3.7% annual growth during the past five years, but some of that is coming from new stores, not existing ones, which matter more. My colleague Travis Hoium has noted that same-store sales from stores open more than a year have been very weak recently -- and that profit margins in the company's international operations have been falling.

You might also want to avoid Wal-Mart if you aren't comfortable with its low compensation for employees that has many of them on welfare while working full-time. Financial writer Barry Ritholtz has noted that Wal-Mart employees make up the biggest group of food-stamp recipients, and that the average worker receives about $1,000 in public aid. Some workers and organizers are protesting, asking for a minimum of $15 per hour. The company has said that it's interested in getting to a point where it is paying all workers more than minimum wage, but how much more remains unclear.

Finally, the stock's valuation might also keep you away, as it doesn't seem undervalued. Current and forward-looking P/E ratios  of 16 and 15, respectively, are both above the company's five-year average of 14. It's not richly overvalued, either, but you can definitely find more compelling growing companies.

Longtime Fool specialist Selena Maranjian, whom you can follow on Twitter, owns shares of Berkshire Hathaway. The Motley Fool recommends Berkshire Hathaway. The Motley Fool owns shares of Berkshire Hathaway. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.