Warren Buffett bought his first stock in 1941, at age 11. He made his first million at age 30, took control of Berkshire Hathaway at age 35, and became a billionaire at age 56.

That meteoric ascent through the financial world puts Buffett in rarified air. He has more investing experience than most people have life experience and is currently the fifth-richest person in the world today, at age 92.

In short, Buffett is a perfect role model for aspiring investors. Here's his advice for making money in the stock market.

A person is looking at a computer while seated beside a window.

Image source: Getty Images.

Hold good stocks for long periods of time

Buffett once said, "All there is to investing is picking good stocks at good times and staying with them as long as they remain good companies." There are three important lessons packed into that sentence.

First, investors need to do their homework to find good stocks. That means businesses with a durable competitive advantage, solid financials, and strong growth prospects.

Second, valuation always matters. A good stock at a bad price is often a bad investment. Third, investors should hold good stocks through bull markets and bear markets, selling only if their investment thesis breaks or they need the money.

Bear markets are a particularly good time to buy stocks

In his 2016 letter to Berkshire shareholders, Buffett offered the following insight: "Every decade or so, dark clouds will fill the economic skies, and they will briefly rain gold. When downpours of that sort occur, it's imperative that we rush outdoors carrying washtubs, not teaspoons." He also explained that investors should look favorably on periods of widespread fear because they tend to serve up bargain purchases.

Indeed, the financial world is rife with fear today. High inflation and rising interest rates have investors worried about a possible recession, and those concerns sent the S&P 500 tumbling into a bear market last year.

But the forward price-to-earnings ratio of the S&P 500 is currently 17.1, below the 10-year average of 17.3. That means many stocks are currently trading at a discount to their historical valuations. In other words, now is a great time to put money into the market.

Investors should buy an S&P 500 index fund

In his 2013 shareholder letter, Buffett opined that most non-professional investors should avoid buying individual stocks. Instead, he recommended buying "a cross-section of businesses that in aggregate are bound to do well." He also said an S&P 500 index fund would achieve that goal.

Berkshire owns shares of two S&P 500 index funds: the Vanguard S&P 500 ETF (VOO 1.22%) and the SPDR S&P 500 ETF (SPY 1.24%). Both index funds track 500 large-cap U.S. stocks that span all 11 market sectors.

This allows investors to diversify across a variety of blue chip American businesses. The Vanguard ETF has a lower expense ratio, but either one is a good option, especially for investors looking to avoid the homework that comes with owning individual stocks.

Buying an S&P 500 index fund is akin to buying a slice of the U.S. economy, and Buffett sees that as a compelling option. His 2015 letter to shareholders offered this explanation: "For 240 years it's been a terrible mistake to bet against America, and now is no time to start. America's golden goose of commerce and innovation will continue to lay more and larger eggs."

Buffett reiterated those feelings in his latest shareholder letter, noting that he has yet to see a time when it made sense to bet against America.