From 1965 through 2022, CEO Warren Buffett's holding company Berkshire Hathaway (BRK.A -0.39%) (BRK.B -0.19%) turned every dollar invested in Berkshire stock into $37,875. That's 57 years (and counting) of turning strong stock picks and full acquisitions into returns for shareholders. It's also solid proof that it can pay off to see what Buffett has been buying and following his lead.

Every quarter, Berkshire discloses what stocks it owns on a form 13F that's filed with the Securities and Exchange Commission. Two stocks that have long been present on those Berkshire 13F forms are Apple (AAPL 0.31%) and HP (HPQ 0.18%). Here's what Buffett likely sees in these companies and why you should consider buying these two stocks today.

1. Apple

From Buffett's purchase of See's Candies in 1972 to his large bet on Coca-Cola stock in the 1980s, the Oracle of Omaha has a keen eye for identifying brands that can stand the test of time.

At the end of the fourth quarter in December, Berkshire held over 895 million shares of Apple stock worth $116 billion. The stock is Buffett's largest holding and one of the largest investments of his career. While Apple is technically a technology company, it sells millions of devices every year primarily because of its marketing and brand power and the experience it provides customers across hardware and software.

Consumers have a lot of choices when purchasing a new smartphone or PC, but once someone buys an iPhone, for example, there's a good chance they will stick with it. This is because of the investments Apple puts into integrating its devices around a cohesive ecosystem of software services and apps.

The power of Apple's ecosystem is perhaps most evident in the growth of paid subscriptions, including third-party subscriptions in the App Store. Apple now has 935 million subscriptions, up nearly four times the level from five years ago. 

Moreover, the growth of Apple's installed base of devices, now over 2 billion, provides ample opportunities to continue growing revenue from services, which make up about 17% of Apple's total revenue, while the iPhone still makes up about half of the business. 

Despite a 6% decline in sales last quarter, primarily driven by lower sales of iPhone, it's notable that Berkshire slightly added to its Apple stake recently. Demand for iPhone has remained quite strong despite rising inflation over the last year. That speaks to the essential nature of these products, which are a key part of people's lifestyles.

Moreover, Apple generates large streams of free cash flow, coming to $97 billion over the trailing-12-month period through December. This funded $25 billion in capital returns to shareholders last quarter through dividends and share repurchases.

Apple's large cash resources will fund the development of new products, including the upcoming mixed-reality headset expected to be announced this year. Apple should be a rewarding stock to hold for a long time.

2. HP

Berkshire first disclosed a large stake in HP in the first quarter of 2022. At the end of the fourth quarter, Berkshire owned over 104 million shares worth about $2.8 billion. This wouldn't be an unusual bet for Buffett, considering his previous stake in IBM, which Berkshire exited years ago.

What likely appeals to Buffett (assuming the stock wasn't bought by one of his investing lieutenants) is HP's market leadership in providing essential computing services for consumers and enterprises, in addition to graphics and 3D printing solutions. Another factor that might have won Buffett over is HP's commitment to return 100% of free cash flow to shareholders through dividends and share repurchases. Companies that follow shareholder-friendly capital return policies will generally tend to be more disciplined in managing costs and capital allocation to maximize returns to shareholders over time.

Berkshire's investment in HP comes at a challenging time for the company. Adjusted sales fell 15% year over year last quarter. Businesses are pulling back on spending right now, but HP has seen this before. It experienced an initial dip in sales at the start of the pandemic in 2020 before business recovered.

HPQ Revenue (Quarterly) Chart.

HPQ Revenue (Quarterly) data by YCharts.

While there is no telling when revenue will pick up again, management continues to invest for the future in this downturn.

Over the last few years, HP shifted resources to better growth opportunities, given the competition from digital services pressuring sales in its legacy printing business. Last year, HP acquired Poly, a provider of workplace collaboration software, headsets, and cameras, for $3.3 billion. This positions HP to ride the growth of business investment in digital services, such as remote work solutions.

HP also sees opportunities to expand into computer accessories. In fiscal 2021, HP acquired HyperX, a leading brand of gaming peripherals -- a market expected to grow by about 10% per year through 2025, according to Grand View Research. 

HP is also making investments in software and artificial intelligence (AI) to develop new solutions that might lead to more growth avenues. It's partnering with leading graphics chip supplier Nvidia to develop high-performance computing products for data science and AI use cases.  

Buffett is known to invest in companies at a discount to intrinsic value, or what Buffett often refers to as a margin of safety. HP stock trades at a low price-to-earnings (P/E) ratio of 9 based on forward earnings estimates, which is a significant discount to the S&P 500 index average P/E ratio of 21. That could signal a wide margin of safety between HP's share price and what it could be worth down the road.

If you are looking for a value stock in 2023, Berkshire-backed HP might be a smart bet.