New York CNN Business  — 

Sometimes in investing, a little luck goes a long way. Just ask Warren Buffett. The Oracle of Omaha is set to make a handsome profit from a new investment in video game maker Activision Blizzard that Berkshire Hathaway made during the quarter before Microsoft announced its plans to buy it.

According to a filing late Monday with the Securities and Exchange Commission, Berkshire Hathaway (BRKB) bought nearly 14.7 million shares of Activision Blizzard (ATVI) in the fourth quarter of 2021. The stake was worth about $975 million at the time, an average price of $66.53 a share.

But Activision Blizzard is now trading at about $81.50 a share following Microsoft’s (MSFT) nearly $70 billion deal, announced last month. That means that Berkshire’s stake is now worth about $1.2 billion, which works out to a quick 22.5% gain.

And if the deal is approved, Berkshire could make even more than this. Microsoft’s offer for Activision Blizzard values the company at $95 a share in cash.

The investment in Activision Blizzard comes a little bit out of left field for Berkshire, given that Buffett is known more for buying stakes in stodgy, more value oriented businesses such as banks, consumer staples like Buffett’s beloved Coca-Cola (KO), and oil stocks.

Still, Activision Blizzard, before the Microsoft takeover, was also the kind of classic, out of favor value stock that Buffett loves. Shares of Activision Blizzard tumbled nearly 30% in 2021 due to a sexual harassment scandal and the delayed launch of several key games.

And during the past few years, Berkshire has made more moves into tech. Apple (AAPL) is now the firm’s largest investment and Berkshire even has a small stake in Amazon (AMZN) and cloud software firm Snowflake.

It’s also not clear if Buffett was the driving force behind the decision to invest in Activision Blizzard or if the call was made by one of the investment lieutenants who manage Berkshire’s massive portfolio with Buffett: Ted Weschler and Todd Combs. Combs is also CEO of Berkshire-owned Geico.

Berkshire does not have an investment in Microsoft, even though Buffett is good friends with Microsoft co-founder Bill Gates.

Buffett stepped down as a trustee of the Bill and Melinda Gates Foundation last year shortly after Bill and Melinda announced plans to divorce. Gates resigned from the boards of both Microsoft and Berkshire Hathaway in 2020.

Bill Gates also no longer has an executive role with Microsoft and he has donated a large portion of the shares that he had owned in the company to charities. Gates and Buffett are currently the fourth and sixth most wealthy people on the planet, according to Forbes.