What's Warren Buffett's favorite holding period for a stock? Forever. Granted, even Buffett doesn't always hang onto stocks for a long time. But his preference is to do so.

Some stocks that Buffett and his team have bought for Berkshire Hathaway's (BRK.A -0.76%) (BRK.B -0.69%) portfolio probably won't be among Berkshire's holdings within a few years. However, others stand out as definite keepers. Here are three top Buffett stocks you can buy and hold for decades.

A smiling person sitting in a chair with hands behind head and feet propped up on a table.

Image source: Getty Images.

1. Apple

Apple (AAPL -0.35%) ranks as the biggest holding in Berkshire's portfolio by far. Buffett has even referred to the tech company as one of Berkshire's "four giants." And Apple is the only one of those giants for which Berkshire doesn't either fully own or have a majority stake.

The main driver behind Apple's success is, of course, the iPhone. Every year Apple launches a new version of the popular phone. And every year, millions of loyal customers purchase the new version. This repeated upgrade cycle gives Apple a strong recurring cash flow. 

Even better, Apple has built an entire ecosystem around the iPhone. The company sells peripheral devices such as AirPods and Apple Watch. The App Store markets a huge lineup of apps that run on iPhones and iPads. Apple's services include Apple Card, Apple Music, and iCloud.

Even if phones are eventually replaced with other communications devices, Apple seems likely to be at the forefront of the transition. The company also has growth opportunities in other areas including augmented reality and self-driving cars.

Could Apple be rendered obsolete one day? Maybe, but a bet on Apple is much more likely to pay off than a bet against it. 

2. Amazon.com

Buffett stated publicly a few years ago that he didn't make the call to buy Amazon.com (AMZN 3.43%) shares for Berkshire's portfolio. Instead, one of Berkshire's two investment managers led the way. However, Buffett regretted not buying Amazon earlier.

Amazon is best known for its online shopping business. Even though the company reigns as the undisputed champion in the e-commerce market, it should still have plenty of room to grow. E-commerce accounted for only 14.3% of total retail sales in the first quarter of 2022, according to the U.S. Census Bureau. 

However, Amazon Web Services (AWS) is the company's biggest growth driver. AWS continues to pick up momentum as Amazon launches new features for the cloud hosting service. One new capability looks especially intriguing: AWS IoT TwinMaker enables developers to quickly create digital twins of buildings, factories, and other real-world systems.

E-commerce and AWS will likely remain Amazon's bread and butter for years to come. But the company also has tremendous opportunities in healthcare with its online pharmacy and telehealth services, artificial intelligence-powered devices, streaming TV, and self-driving car technology. 

3. Markel

Markel (MKL -1.00%) hasn't been in Berkshire's portfolio for very long. It was one of eight new stocks Buffett bought in the first quarter of 2022. And Markel arguably ranks as the best of the bunch.

It's probably no coincidence that there are some striking similarities between Markel and Berkshire Hathaway. Both companies have core insurance businesses. Both use the cash generated by those businesses to invest in other publicly traded companies.

There are some differences, though. While Berkshire mainly offers standard insurance and reinsurance products, Markel focuses on specialty insurance for individuals and organizations with unique needs. Also, Markel's investing style doesn't match up exactly with Berkshire's. Interestingly, though, Markel's biggest position happens to be Berkshire. 

The need for specialty insurance won't go away. Many of the stocks in Markel's investment portfolio, including Berkshire, Apple, and Amazon, are ones to buy and hold for decades. As a result, Markel appears to be the kind of forever stock that Buffett really likes.