Warren Buffett's legendary and storied investment career has yielded investors in his company, Berkshire Hathaway (BRK.A -0.59%) (BRK.B -0.74%), breathtaking returns. Since Mr. Buffett took the helm of Berkshire in 1965, the stock has produced a 20.1%  annual compounded return for its shareholders through the end of 2021. Buffett's effort trounced the S&P 500, which generated annual compounded returns of 10.5%, including dividends over the same time frame.

Let's add some color to Buffett's 56-year track record. If a long-term buy-and-hold investor (like Buffett, Berkshire's largest shareholder) plunked down $10,000 for Berkshire shares when Buffett took over and had the patience never to sell a single share, they would have had $284,713,732.33 at the end of 2021.

Buffett's investment criterion is the same whether he buys stocks or entire companies. He wants to buy great companies whose shares have been hammered down to attractive prices, then hold them for a long time. Many times his best stock buys come from bear markets like today.

For example, in the aftermath of the Great Recession, Buffett invested $5 billion in Bank of America. His investment included preferred shares and warrants to buy 700 million shares of the stock at $7.14, which traded above $50 before the recession. Buffett eventually exercised the warrants, and his Bank of America position was worth  $31,344,432,000 at the end of the last quarter. That's a 629% return on his original $5 billion, which doesn't even count the shares he sold at a profit along the way or the preferred and common dividends the shares paid him. But Bank of America stock is not on this list of current stock opportunities.

Picture of Warren Buffett.

Image source: The Motley Fool.

Warren Buffett's favorite holding period is "forever"

Buffett is quoted as saying his favorite holding period is "forever." No one can hold a stock forever. What the legendary investor means is that the best companies have the staying power to increase their value for the foreseeable future.

For example, Buffett first bought shares of GEICO in 1951  when he was 20 years old. Berkshire eventually acquired the entire company in 1995  and still holds it inside its insurance portfolio after 72 years. He also bought shares of Coca-Cola in 1988,  months after Black Monday. Berkshire has owned its Coke shares for 34 years and counting. But neither of these two is the Buffett holding you need to know about now. Those companies didn't make the list either. Here's which ones did.

1. Apple: The iPhone is great, but Apple has another segment that may be even better

Warren Buffett started accumulating shares of Apple (AAPL -2.19%) in 2016  and bought more in the first and second quarters of 2022 as the shares slumped. He regards the company as probably the best company that he knows of in the world.

Apple controls roughly  50% of the smartphone market in the U.S. and has a healthy share of the global market. But it might be the services that iPhone customers add on that keep making the company more profitable every year. iPhone users can download music from the Apple Music app, make contactless payments with Apple Pay, and store their pictures in their iCloud storage. Customers pay a small fee for the services, which makes a big impact on Apple's bottom line.

The services are digital, which means every new customer costs Apple very little. Therefore, every dollar of additional revenue from a new service is more profitable than the last. In 2017, when Apple first disclosed the data, its gross margin from services was  55%. That's more than the  35.7% gross margin from products like iPhones, Macs, and iPads. By 2021, the gross margin from Apple's services had vaulted to nearly  70%. In dollar terms, the gross margin from Apple's services segment leaped 165% from  $17,989 billion in 2017 to  $47,710 in 2019.

Apple looks to expand the profitability of its services as new music releases hit every day and folks download Apple Music. Perhaps more exciting is Apple Pay, which recently surpassed payment behemoth Mastercard in transaction volume and has plenty of room to run.

Apple's stock is down about 14% this year and trades at a price-to-earnings ratio of under 26 times. Buffett was a buyer in the first two quarters of the year, and investors are now getting a similar price to Buffett's recent buys. If the valuation was good enough for the Oracle of Omaha, it should be good enough for other investors.

2. This Buffett stock controls the internet

Buffett also holds a lesser-known stock that investors should be familiar with. The company provides infrastructure to the internet by providing the domain registry for every .com and .net domain on the web. It is responsible for ensuring these domains are up and running 24 hours a day. That's not easy to do, considering it handles billions of internet queries daily. It has executed flawlessly, though. The company boasts an astounding 25  years of uninterrupted service.

The company is Verisign (VRSN -1.20%), and it has been granted exclusive rights to run its domains by the Internet Corporation for Assigning Names and Numbers (ICANN), a governing body of the internet. Verisign's agreement with ICANN gives it a monopolistic position (what Buffett describes as a "toll bridge") on its domains. Hundreds of millions of webpage owners pay an annual fee to keep them up.

Person using a touch screen to perform an internet search.

Image source: Getty Images.

The number of .com and .net domain names has proliferated over the years. Verisign provided service for 90.4  million domain names in 2008. By the end of last quarter, that number had increased by 92% to 174.3  million. That has allowed the stock to trounce the market since Buffett first bought shares in the fourth quarter of 2012.

The average closing price of Verisign in the fourth quarter of 2012 was  $41.62. Verisign stock is trading at about $176 per share, which has bagged Buffett a 322% return. That's significantly better than the  158% total return of the S&P 500.

Buffett's return is impressive because it includes the stock's 30% pullback this year. That also means that investors have another shot at buying the stock cheaply. Though we can't know the exact valuation at which Buffett bought his first Verisign shares, we can make an educated estimate.

At the beginning of the fourth quarter of 2012, Verisign's price-to-earnings ratio was  29.51 times. At the end of the quarter, it had drifted down to 19.81 times. Buffett thought that was an attractive valuation for a monopolistic stock he could hold forever. Investors who regretted not buying the stock when Buffett did can now buy the stock at 23.38 times, at the low end of Buffett's range.

Mr. Buffett still owns Verisign shares inside Berkshire Hathaway a decade later. That indicates he still plans to hold the shares. Verisign may be in a better position than it was before. Now, companies like GoDaddy and Wix.com make it easier for individual people, small businesses, and corporations to register domains.

Worried about the bear market? A stock market recovery is coming

The Oracle of Omaha is often quoted as saying, "be fearful when others are greedy, and greedy when others are fearful." Today's bear market means investors should be greedy. Buffett has earned his investors remarkable returns by buying beaten-down stocks of great companies in tumultuous times like now, then holding them for a very long time.

No one knows when the market will recover, but it will. Since 1928 there have been 24  bear markets in the S&P 500, and all of them recovered. Those are rare opportunities for heady long-term investors to get rich. When it happens this time around, you may regret not buying these beaten-down Buffett stocks.