The age-old debate of whether to invest in stocks or bonds has ensued for decades. Stocks allow investors to become part owners in a company through equity, while a bond is more like a loan investors make to a corporation or government entity that will be paid back on a certain date plus interest.

Bonds are viewed as more reliable and steady investments, while stocks are perceived as providing higher returns over time. Which one is the smarter investment really depends on who you are talking to. But if you ask legendary investor Warren Buffett, the CEO of large conglomerate Berkshire Hathaway (BRK.A -0.49%) (BRK.B -0.49%), it's a clear and easy choice.

What Buffett prefers and why

It's been made pretty obvious over the years that Buffett prefers stocks over bonds. That's not to say that he completely hates bonds or doesn't see value in them, but he definitely subscribes to the idea of stocks being the better asset for long-term returns.

At the end of 2022, Berkshire had roughly $92.7 billion of investments in short-term securities and another $25.1 billion in fixed-maturity securities, but for the most part, this is really just another way to hold highly liquid assets that can make a little bit more yield than cash. Berkshire also held more than $308 billion of stocks at the end of last year.

Buffett has said that when it comes to a retirement strategy, he believes in a 90/10 allocation model, in which 90% of one's money is invested in stock-based index funds, while the remaining 10% is invested in less risky investments like short-term government bonds.

But the latest evidence of Buffett's preference for stocks over bonds came in the Oracle of Omaha's recently released annual letter to shareholders. In this widely read letter, Buffett describes two of Berkshire's better investments that were first initiated in the mid-1990s. By 1994, Berkshire had spent $1.3 billion to purchase 400 million shares of Coca-Cola (KO 0.02%). The annual dividend at the time amounted to $75 million. Fast-forward to the end of 2022, and Berkshire's Coca-Cola stake has grown to about $25 billion and the annual dividend is in excess of $700 million.

Similarly, in 1995, Berkshire had built up about a $1.3 billion position in the large payments and credit card company American Express (AXP -0.59%). Annual dividends at the time amounted to $41 million. Today, the conglomerate's stake in American Express is roughly $22 billion and the annual dividend payments have grown to more than $300 million.

Buffett then asks readers to imagine what would have happened had Berkshire made a $1.3 billion investment in a high-grade 30-year bond or similar investment instrument. Well, that investment would still only be worth $1.3 billion, it would represent just 0.3% of the company's net worth, and annual payments would remain unchanged at around $80 million for multiple decades. Buffett writes:

The lesson for investors: The weeds wither away in significance as the flowers bloom. Over time, it takes just a few winners to work wonders. And, yes, it helps to start early and live into your 90s as well.

Stocks are the right choice when done correctly

I agree with Buffett that stocks are a better avenue for wealth creation. In fact, since Black Monday in 1987, stocks have performed about 20% better than bonds. The caveat I would add here is that stocks are better when used correctly.

This doesn't mean day trading but rather long-term investing -- namely, buying stocks with the intent to hold for at least five or 10 years (and really longer, if you can). Just look at how well Berkshire has done by holding stocks for close to 30 years. If you don't have the knowledge or time to pick individual stocks, then put your capital into stock-based index funds or invest it in the broader market. For Buffett, it's simply a no-brainer.