Thinking about buying stocks as the new year begins? You might want to press the pause button.

No, I'm not recommending that you avoid the stock market altogether. That could prove to be a mistake over the long term. However, Warren Buffett has some words of wisdom that I think every investor should heed. Take Buffett's advice: Don't buy any stock in 2024 unless it passes this straightforward test.

Warren Buffett.

Image source: The Motley Fool.

The Buffett test

In Buffett's annual letter to Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%) shareholders released in 2014, he explained a test that he and his longtime business partner Charlie Munger applied before buying any stock. Munger passed away in November 2023, but it's a safe bet that Buffett will still employ this same process in 2024.

There are two steps to Buffett's test:

  1. Determine if you can "sensibly estimate an earnings range for five years out or more."
  2. If the answer to the first step is yes, buy the stock only if its price is reasonable compared to the lower end of the estimated earnings range.

You might wonder if Buffett sometimes bends the rules. For example, would he still buy a stock if it passed the test but the overall economic picture looked uncertain? Would he buy the stock if Wall Street hated it? The answer is a resounding "yes." He wrote to Berkshire shareholders nearly a decade ago:

In the 54 years we [he and Munger] have worked together, we have never foregone an attractive purchase because of the macro or political environment, or the views of other people. In fact, these subjects never come up when we make decisions.

Easier said than done

While the Buffett test for buying stocks is straightforward, it's easier said than done. The most difficult part is estimating earnings for a company for the next five or more years.

Buffett readily acknowledged that he and Munger had frequently been unable to estimate future earnings with any degree of confidence, saying that this was "usually the case." When this occurred, he stated succinctly, "[W]e simply move on to other prospects."

He also noted that he and Munger had made mistakes in buying stocks at times. Staying within their "circle of competence" helped minimize such blunders, but it didn't completely eliminate them. This is an important point. Investors will be better equipped to estimate future earnings for the stocks in industries with which they are familiar.

Two stocks that pass the Buffett test in 2024

Buffett hasn't bought many stocks in recent quarters -- evidence that he isn't finding many that pass his test. However, I think some stocks pass the Buffett test in 2024.

D.R. Horton (DHI 0.78%) is one of them, in my view. Buffett initiated a stake in the homebuilder in 2023. Despite its shares soaring 70% last year, D.R. Horton trades at only 11.4 times expected earnings. That makes the stock attractively valued even if the company barely increases its earnings at all over the next five years.

But D.R. Horton should be able to deliver solid earnings growth. The U.S. still suffers from a severe housing shortage. With the Fed hinting that interest rates should come down somewhat in 2024, the company should be able to build and sell increasingly more homes for years to come.

Now for a stock that Buffett doesn't own: Meta Platforms (META 0.43%). It's fair to say that Meta doesn't fall into the legendary investor's circle of competence, so he probably wouldn't feel comfortable estimating its future earnings. However, Wall Street appears to believe that it might pass the Buffett test. Meta's price-to-earnings-to-growth (PEG) ratio based on analysts' five-year earnings-growth projections is a low 0.79. Any PEG ratio below 1.0 is considered to be an attractive valuation.

Meta has grown its earnings by an average of close to 8.5% annually over the last five years. Its financial performance has improved, though. If we assume that the company will increase its past earnings growth only slightly, the stock looks reasonably valued.

Buffett's really simple alternative

Each investor should follow Buffett's two-step process on their own before buying any stock in 2024. But don't worry if you aren't comfortable estimating earnings. Buffett has a really simple alternative that doesn't involve his test at all.

He argued in his letter to Berkshire shareholders in 2014 that most investors would be better off putting their money in low-cost S&P 500 index funds instead of trying to pick individual stocks. Buffett even predicted that anyone who follows this advice "is virtually certain to get satisfactory results" over the long term.