Warren Buffett has decades of investing success under his belt -- and the multibillion-dollar net worth to prove it. Fortunately for the entire investing community, he shares his expertise in interviews and annual letters to Berkshire Hathaway (BRK.A 1.18%) (BRK.B 1.30%) shareholders.

In Buffett's 2020 shareholder letter, he identified five requirements for making money in the stock market.

1. Time

The stock market's long-term average annual growth rate is about 7%, net of inflation. But you won't earn that 7% every year. You might lose 20% this year, gain 8% next year, grow another 10% the following year, and so on. As more years pass, the good years eventually outpace the bad ones.

The longer you stay invested, the better your chances of realizing positive returns. You'll probably see gains over 10 years, but a 20- or 30-year timeline almost ensures you'll make money. Historically speaking, the stock market has never lost value over 20 years or more.

2. Inner calm

Remain calm, and you can make thoughtful decisions in the face of market turmoil. Get nervous and you're more likely to make short-sighted moves you'll later regret.

Remember March 2020? The growing coronavirus pandemic struck fear into the hearts of investors. In just over a month, the S&P 500 fell 34%. Those who stayed calm and waited for a reversal saw their account values restored before September.

Those who liquidated during the month-long decline likely did not recoup their losses by September. They accepted temporarily lower share values as permanent -- and paid a steep price for that decision.

3. Diversification

Diversification spreads out your risk across multiple stocks, sectors, and asset classes. By owning assets that each behave differently, you minimize the risk of all your positions crashing at the same time. Instead, some will go up while others go down.

That mix of gains and losses nets out to smoother performance over time. And smoother performance leads into better performance -- because you sidestep the most extreme setbacks.

4. Minimal transactions

Buffett's reference to minimizing transactions is a nod to the buy-and-hold investing strategy. You practice buy-and-hold by choosing high-quality stocks or funds and keeping them in your portfolio indefinitely. The only time you'd sell is if the company's long-term outlook has fundamentally deteriorated.

As a buy-and-hold investor, you look to generate gains from long-term price appreciation. That's very different from the investor who buys and sells frequently to capitalize on short-term market trends.

5. Minimal fees

Investment fees cut directly into your returns. And unfortunately, there are many types of fees that apply to investors. You might pay account fees in your 401(k), management fees to a financial advisor, sales fees on mutual funds, and administrative fees on mutual funds and exchange-traded funds (ETFs).

Some of these fees are worth paying. Your 401(k) fees make sense, for example, when your retirement account generates thousands annually in free employer match contributions. Likewise, ETF administrative fees can be a good trade-off if you prefer the convenience of ETFs over individual stocks.

Still, you can work to lower the fees you accept. Fund administrative fees are your low-hanging fruit here. Always compare a fund's expense ratio to those of its peers before you invest. Choose the fund with the lower ratio and you'll likely see higher returns over time. Fortunately, there are many fund options with expense ratios of 0.1% or less.

Take the long road

Buffett's approach obviously isn't a get-rich-quick strategy. It's something better: a get-rich strategy.

Give yourself time, stay calm, diversify, invest in long-term price appreciation, and keep an eye on those fees. That's the formula. Follow it now and reap the rewards in the decades to come.