Warren Buffett is famous for picking stocks that win over the long term. And that's why it's an excellent idea to consider some of the stocks in his portfolio for your own portfolio. Long-term investing implies holding on to a stock for at least five years -- but you may decide to keep the stock for much longer. For example, Buffett has owned Coca-Cola shares since the late 1980s.

Why is long-term investing best? Because it offers you the opportunity to benefit from a company's progress -- and you'll generally gain more that way than by frequently switching in and out of stocks. The strategy has helped Buffett beat the S&P 500 over the past 57 years.

Want to give it a try? Here are two Buffett stocks to buy hand over fist.

1. Amazon

Amazon (AMZN 3.43%) struggled last year as inflation increased costs and the company's quick expansion left it with excess fulfillment capacity. But the e-commerce giant aggressively tackled the problems. And its efforts already are showing results. In the most recent quarterly earnings report, Amazon's operating income increased, and the company greatly reduced its outflow of cash.

To get to this point, Amazon announced 27,000 job cuts this year. The company also favored investing in its highest-growth areas -- such as infrastructure to support Amazon Web Services (AWS), its cloud computing business. And Amazon transitioned its fulfillment process to a regional one from a national one -- a step that should increase delivery speed and cut costs.

These and other efforts should help Amazon continue to dominate in e-commerce and cloud computing over the long term. This is important because these are two markets that are growing in the double digits. So, they could ensure Amazon's growth over time. And traditionally, AWS has driven profit at Amazon. That's likely to continue once the economy improves and clients' budgets improve.

Today, Amazon shares still look reasonably priced, even after recent gains. They are trading for 2.5 times sales, lower than their average over the past few years. So now is a great time to get in on this Buffett stock.

AMZN PS Ratio Chart

AMZN PS Ratio data by YCharts

2. Johnson & Johnson

Buffett surely likes Johnson & Johnson (JNJ -0.46%) for its dividend profile. The pharma giant has a spot on the elite list of Dividend Kings. These are companies that have increased their dividends for at least 50 consecutive years.

Why does this matter if you're just buying the shares now? It shows the particular company is committed to dividend growth. And after such a track record, it's unlikely the company will change its policy -- as long as it can afford the increases.

That leads me to another positive point: J&J has what it takes financially to keep boosting its dividend,  thanks to more than $16 billion in free cash flow.

J&J pays a dividend of $4.76, representing a dividend yield of 3%. That's higher than the average for the pharmaceutical industry, according to the NYU Stern School of Business.

But there's more to J&J than just passive income. The company is an industry giant that generates billions of dollars in annual earnings.

And the story is about to get even better. J&J is spinning off its consumer health business into a separate entity called Kenvue. This is great news because consumer health has been the company's slowest-growing business.

Now, J&J can devote its resources to its faster-growth pharmaceuticals and medtech businesses. And, without the impact of consumer health, J&J should deliver stronger revenue growth.

Today, J&J trades for only 14 times forward earnings estimates, down from more than 18 last year. This looks like a deal, considering the potential new phase of growth ahead -- and J&J's dividend strength. That's a combination to make you -- and Warren Buffett -- cheer.