If you had invested $10,000 in Warren Buffett's Berkshire Hathaway (NYSE: BRK.A) (NYSE: BRK.B) 40 years ago, your investment would be worth $4.42 million today. Those massive gains were driven by Buffett's big bets on companies like Coca-Cola, Bank of America, American Express, and Apple -- and investors still follow his biggest trades closely today.

But with dozens of stocks in Berkshire's portfolio, it can be easy to overlook some of Buffett's smaller and lesser-known positions. Let's focus on three of those underrated plays -- and why they might be good long-term plays for patient investors.

Adult and two children putting coins in piggy bank.

Image source: Getty Images.

1. A leading maker of PCs and printers

Berkshire Hathaway took an 11% stake in HP (HPQ -0.46%), one of the world's top producers of PCs and printers, in April 2022. Berkshire subsequently reduced its stake to about 5% as HP struggled to stabilize its core businesses.

However, HP still looks very cheap at ( times forward earnings, and it pays an attractive forward dividend yield of 3.7%. Therefore, investors who are willing to look past its near-term slowdown might be well-rewarded over the next few years.

HP's revenue and adjusted earnings per share (EPS) declined 1% and 7%, respectively, in fiscal 2022 (which ended in October 2022) as the sluggish post-pandemic market, inflation, rising interest rates, and other macro headwinds curbed its sales of new PCs and printers to individuals and businesses. In fiscal 2023, its revenue and adjusted EPS fell 15% and 18%, respectively.

Those declines were steep, but most chipmakers expect the PC market to stabilize and recover this year. As that market warms up again, HP continues to cut costs and streamline its business by laying off employees and simplifying its lineup of PCs. Analysts expect its revenue and adjusted EPS to grow 2% and 5%, respectively, in fiscal 2024 -- and accelerate slightly in fiscal 2025. HP's growth rates might seem sluggish, but it could still be a great deep value play at these levels.

2. A growing cloud software company

When Snowflake (SNOW 3.69%), a leading provider of cloud-based data warehouse services, went public in September 2020, Berkshire Hathaway surprised a lot of investors by scooping up 2% of its IPO shares. Warren Buffett had traditionally avoided unprofitable hypergrowth tech companies throughout most of his career.

However, Snowflake stood out because it was carving out a defensible niche with its flexible data warehousing services -- which aggregate and clean up data across a wide range of computing platforms so they can be easily fed to third-party applications. That "silo busting" approach made it easier for companies to make data-driven decisions.

From fiscal 2020 to fiscal 2023 (which ended last January), Snowflake's revenue grew at a compound annual growth rate (CAGR) of 98%. It believes its product revenue, which accounts for most of its top line, can reach $10 billion by fiscal 2029 -- which would represent a CAGR of 32% from fiscal 2023. It isn't profitable yet, but its profitability could also improve through the end of the decade as economies of scale kick in.

At 19 times next year's sales, Snowflake is still one of Berkshire's priciest and most speculative plays. But it could still have plenty of room to run as the growth of the artificial intelligence (AI) market drives more companies to clean up their data.

3. The world's top e-commerce and cloud company

Berkshire took a stake in Amazon (AMZN 3.43%), the world's largest e-commerce and cloud company, in May 2019. It still owns 10 million shares (0.1% of the company) as of this writing.

Amazon's stock has stayed nearly flat over the past three years as inflation broadly curbed consumer spending and the macro headwinds throttled the growth of its higher-margin cloud business. Its revenue rose 22% in 2021 and 9% in 2022, and analysts anticipate just 2% growth in 2023. To make matters worse, a poorly timed investment in the struggling electric vehicle (EV) maker Rivian Automotive caused it to turn unprofitable in 2022.

But for 2024, analysts expect Amazon's revenue to rise 11% as it returns to profitability. That growth should be driven by the expansion of its overseas e-commerce marketplaces and the stabilization of its cloud business in a warmer macro environment. Its stock might initially seem a bit pricey at 44 times forward earnings, but that valuation should be compressed by its rising profits over the next few years. In terms of its top line growth, it arguably looks like a bargain at less than 3 times next year's sales. Simply put, it might be smart to load up on Amazon's stock before its growth accelerates again.