One of Warren Buffett's best-known kernels of wisdom is that investors should be fearful when others are greedy, and greedy when others are fearful.

The 86-year-old billionaire has followed his own advice many times in the past, but a recent notable instance was when he invested $5 billion of Berkshire Hathaway's (NYSE:BRK.A) (NYSE:BRK.B) money into Bank of America (NYSE:BAC) in the summer of 2011.

Bank of America's shares were careening lower at the time, eventually bottoming out around $5 a share, approximately a third of their value 18 months earlier.

Chart showing the increase in Berkshire's investment in Bank of America.

Data sources: Bank of America, author's calculations. Chart by author.

Berkshire bought $5 billion worth of preferred stock in the bank, yielding $300 million a year in annual dividends. To sweeten the pot, Bank of America threw in stock options that give Berkshire the right to buy 700 million shares of the bank's common stock for $7.14 each, which is now well below their price of more than $24 a share.

If you add up the value of these components today, Berkshire's $5 billion investment in Bank of America is worth just under $19 billion. It clearly pays to be greedy when others are fearful.

Offer from The Motley Fool: The 10 best stocks to buy now
Motley Fool co-founders Tom and David Gardner have spent more than a decade beating the market. In fact, the newsletter they run, Motley Fool Stock Advisor, has tripled the S&P 500!*

Tom and David just revealed their ten top stock picks for investors to buy right now.

Click here to get access to the full list!

*Stock Advisor returns as of June 5, 2017.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.