Warren Buffett might be the world's most famous long-term investor. He's become one of Earth's wealthiest people from a decades-long and fruitful investing career. His secret? Finding wonderful companies at fair (or better) prices and holding them.

His favorite companies are those that can steadily generate more cash profits, called free cash flow, over time. Free cash flow often leads to share repurchases and dividends, which Buffett loves.

Buffett has a known affinity for simple businesses but occasionally wades into the technology sector. Consider adding these stocks to your diversified portfolio and invest like Buffett himself.

1. Snowflake

Cloud-computing data company Snowflake (SNOW 3.69%) is one of Buffett's newest positions. His holding company, Berkshire Hathaway, participated in the company's IPO when it went public in 2020. Snowflake is a SaaS company that provides businesses with a cloud-based platform to store, organize, analyze, and share data.

SNOW Revenue (TTM) Chart
SNOW Revenue (TTM) data by YCharts.

Snowflake makes money based on customer usage, potentially foreshadowing growth as society creates more data over time. This is a potential pick-and-shovel style investment for the future. The company's free cash flow has begun growing with revenue, and management has already announced a share repurchase program. Investors should see plenty more cash trickle to them as Snowflake continues growing.

2. Apple

Most people are familiar with iPhone maker Apple (AAPL -0.35%). Today, there are more than 1.4 billion iPhone users worldwide. While Apple has been a remarkable investment for decades, Buffett pounced on shares in 2016 because he saw value in the stock. That decision was great because it's grown into Berkshire Hathaway's largest investment since.

AAPL Revenue (TTM) Chart
AAPL Revenue (TTM) data by YCharts.

Apple remains dominant today; its massive user base helps it grow complementary revenue streams like subscriber services and accessories. The resulting free cash flow is more than what most companies generate in total sales. Apple has spent billions of dollars to lower its share count 38% over the past decade.  It looks like Apple is a safe bet for the long term until the day people no longer wait in lines to buy Apple's latest innovation.   .

3. Amazon

E-commerce is a way of life for many consumers, primarily thanks to Amazon's (AMZN 3.43%) rise. While Berkshire Hathaway owns shares of the company today, Buffett has acknowledged that he should have bought in sooner. The stock has been one of the greatest investments ever, turning $10,000 into $12.8 million since IPO.

AMZN Revenue (TTM) Chart
AMZN Revenue (TTM) data by YCharts.

The secret? Amazon aggressively reinvests its cash profits to build new businesses, such as Amazon Web Services, Prime, and its advertising segment. These growth opportunities still have juice left for squeezing. The stock's best investment returns might be behind it -- after all, its market cap is a whopping $1.3 trillion today. However, its proven ability to innovate and build new businesses should continue creating value for long-term investors.

4. Moody's

Buffett loves simple businesses, and Moody's Corporation (MCO 0.25%) fits the bill. The company analyzes global markets via credit ratings and research, an industry it dominates along with S&P Global. You can think of it as the credit score for the world's corporations. Moody's authority in the credit markets lines up business as corporations continually borrow to help fund growth and other ventures. Berkshire Hathaway has owned the stock for over 20 years.

MCO Revenue (TTM) Chart

MCO Revenue (TTM) data by YCharts.

Investors will love the company's juicy profit margins; Moody's has generated $1.6 billion in free cash flow on $5.5 billion in revenue, a healthy 29% conversion rate. Management takes that cash and repurchases its shares. The share count has fallen nearly 15% over the past decade, helping boost earnings per share (EPS). It's a winning formula that should continue.

5. Visa

Speaking of small groups dominating huge industries, Visa (V -0.23%) enjoys a similar position in the payments industry. It's the world's largest payments network and connects and moves money between merchants and financial institutions whenever you swipe your Visa-branded debit or credit card. You can think of Visa as the world's financial toll booth, a simple but powerful business that Buffett bought and has owned since 2011.

V Revenue (TTM) Chart

V Revenue (TTM) data by YCharts.

Visa is also very profitable, turning $0.58 of each revenue dollar into cash flow. That's helped the company pay a dividend and gobble up its stock, creating market-beating returns for investors. Visa should continue growing over the coming years as people, especially those in emerging markets, move further away from cash payments.