Warren Buffett is one of the most successful investors of all time, and his holding company, Berkshire Hathaway, has achieved a market capitalization of $808 billion, putting it eighth on the list of the world's most valuable companies. Buffett's success has made him a key figure on Wall Street, with countless people following his investment philosophy. 

Lessons like the importance of a long-term mindset and investing in companies producing quality products -- strategies Buffett swears by -- can make a significant difference in your returns. Alongside useful investing tips, Berkshire Hathaway's portfolio is an excellent place to find inspiration. It is filled with companies that dominate high-growth industries and have long histories of providing stockholders with consistent gains. 

Below are two Buffett stocks you can hold forever.

1. Apple

Apple (AAPL -0.35%) makes up 46% of Berkshire Hathaway's portfolio. For reference, Berkshire's second-largest holding is Bank of America, with an 8% share. 

Apple ticks a lot of boxes in Buffett's investing approach. It produces quality products that have built up immense brand loyalty with consumers. The company has leading market shares in multiple categories and offers attractive profit margins. In fiscal 2022, gross margins for products hit a record 36%, with services achieving 72%.

Apple is a behemoth in tech, and its biggest success has been in the consumer product market. iPhone loyalty has become a powerful tool, with the company's interconnected ecosystem of products and exclusive apps like Messages encouraging users to stick with it for the long haul.

In April, Buffett touched on this by saying, "If someone offered you $10,000 to never buy an iPhone again, you wouldn't take it." The sentiment rings true for millions of consumers who would sooner give up countless other brands before using a different smartphone.

Since Berkshire first invested in the iPhone maker in 2016, Apple's shares have soared 581%. And its best move has been to make regular investments in the tech company. It most recently increased its stake by buying more than 20 million shares in the first quarter of 2023.

Apple has stumbled this year amid macroeconomic headwinds. However, its dominance in consumer tech and growing ventures in markets like artificial intelligence (AI) and virtual/augmented reality make it an excellent stock to hold indefinitely. 

2. Amazon

Amazon (AMZN 3.43%) accounts for 0.4% of Berkshire Hathway's holdings, but that equals 10.5 million shares, about a 0.1% stake in the company. This is another business that has a strong command of the consumer market and is making inroads in multiple high-growth industries. 

Berkshire first bought the stock in the first quarter of 2019, with shares rising 83% since then. An economic downturn last year brought steep declines in its share price after a reduction in consumer spending, but a solid recovery in 2023 proves Amazon is a reliable stock worth a long-term investment. 

In fiscal 2022, the company's e-commerce segments reported combined operating losses of $10.6 billion. It reacted quickly, implementing changes such as ending multiple unprofitable projects, closing or canceling construction on dozens of warehouses, and laying off thousands of workers.

The moves are gradually paying off, with the North American segment returning to profitability in the first quarter of 2023 and hitting over $3 billion in operating income in the second.

As the e-commerce operation recovers, Amazon is further strengthening its business by expanding into artificial intelligence (AI). The company is home to the world's largest cloud platform, Amazon Web Services (AWS), with clients such as Sony, Netflix, and Meta Platforms.

Its position in the cloud market gives it an edge in AI as more businesses seek to boost productivity with the technology. As a result, AWS has introduced several new AI services this year and plans to soon venture into chip development. 

Amazon, one of the world's most recognizable brands, has become the go-to for online shoppers everywhere, and along with a lucrative cloud business, its stock is an attractive option to hold forever.