Warren Buffett's exceptional investing skills and long-term commitment to his investments have earned him legendary status on Wall Street. Since taking over as CEO at Berkshire Hathaway (BRK.A 1.00%) (BRK.B 0.79%) in 1965, Buffett has delivered staggering returns of 3,787,464%, or nearly 20% compounded annually. These returns have doubled the S&P 500's performance over that same period.

With results like this, it's no wonder why people comb through Buffett's annual letter to shareholders in search of valuable insights and guidance to become better investors. This year's letter to shareholders provides three key takeaways that can drastically enhance your own approach to investing.

A photo of Warren Buffett.

Image source: The Motley Fool.

1. Winners will grow while losers wither away

Investing comes with risks. Some investments will flourish and deliver significant growth to your portfolio. However, other investments could face significant challenges in a difficult market environment and become losers.

Buffett gave an example of a couple of investments Berkshire Hathaway made three decades ago. In 1994, Berkshire completed its purchase of 400 million shares of Coca-Cola at a cost of $1.3 billion. The company dollar-cost averaged into its position over seven years. Berkshire has held that position ever since, which was worth $25 billion at the end of 2022. Not only that, but the company also collects an annual dividend of $704 million -- a 54% yield on its initial invested value.

Another example is American Express. In 1995, the company purchased $1.3 billion in shares in the company. That position was worth $22 billion at year end and delivers a dividend of $302 million -- a 23% yield on its initial investment.

Today, Coca-Cola and American Express are worth 5% of Berkshire's net portfolio. Buffett pointed out that if a similarly sized investment were made and went nowhere over the past three decades, that investment would be worth 0.3% of Berkshire's portfolio. Buffet's takeaway: "The weeds wither away in significance as the flowers bloom. Over time, it takes just a few winners to work wonders." 

2. Stay invested for the long haul

Another component of Buffett's investing success is his longevity. Buffett began investing at a young age and has remained invested well into his 90s.

Investing long-term is a crucial component of building wealth through the stock market. You have to allow your investments to grow and compound over time. 

Suppose you start with an initial investment of $1,000 and add $500 to your portfolio every month over several decades. Initially, the process of building wealth will seem slow. But assuming you achieve returns of 8% annually, you would reach $500,000 by year 27. The real growth comes later as years of compounding work in your favor. By year 35, your portfolio would double to $1 million. By year 43, you'd hit $2 million, and year 49 would see your investments balloon to $3 million.

A line chart shows how a $1,000 investment with $500 monthly contributions can grow over time.

Chart by author.

The longer you stay invested in the stock market, the more you allow your returns to compound. The S&P 500 has delivered positive returns over any 20-year period since 1900, showing that long-term investing is vital to achieving the right results.

3. Keep some cash available to jump on attractive investment opportunities

Another point Buffett drives home is that Berkshire Hathaway has a steady stream of cash flow to put to work. That's thanks to Berkshire's numerous investments in insurance companies, including GEICO, General Re, Berkshire Hathaway Reinsurance, and its most recent addition, Alleghany. The premiums Berkshire collects provide it with a steady stream of cash flows, which it can use to invest in stocks and build its portfolio continuously.

As investors, we can follow Buffett's lead. You probably have a steady stream of cash flow from your job. It's essential to consistently set aside a portion of your income for your investments.

Ideally, you'll keep some portion of your savings in cash to take advantage of market sell-offs. While you don't want to try to time the market, there are certain periods when asset prices become more attractive than others -- as we saw in tech stocks in 2022. Keeping anywhere from 5% to 20% of your holdings in cash at any given time is an excellent way to stand ready to take advantage of these investment opportunities.

Final thoughts

Investing is a long-term game. Understand that you will have winners and losers as part of your portfolio. The trick is to give your winners the time they need to power your portfolio's returns. In addition, invest money consistently over your life, and keep some cash available to add to high-conviction investments when they become cheap.

Investing can feel intimidating, but these lessons from Warren Buffett provide excellent guidelines to stay the course and build long-term wealth through the stock market.