These days, Bill Gates spends most of his time running the world's largest private charitable foundation, but before that, he ran Microsoft. During his tenure, Microsoft grew from a tiny New Mexico outfit to the software behemoth that nearly squelched Apple in the 90s. Gates didn't always make the right calls, though. In a recent interview, Gates admits his biggest mistake was allowing Android to win.

The interview at venture capital firm Villiage Global covered a wide range of topics, but the Android-specific conversation happens around the 12-minute mark in the video below.

Here's the full quote.

In the software world, particularly for platforms, these are winner-take-all markets. So the greatest mistake ever is whatever mismanagement I engaged in that caused Microsoft not to be what Android is. That is, Android is the standard non-Apple phone platform. That was a natural thing for Microsoft to win. And, you know, it really is winner take all. If you’re there with half as many apps or 90 percent as many apps, you’re on your way to complete doom. There’s room for exactly one non-Apple operating system and, you know, what’s that worth? $400 billion that would be transferred from company G to company M.

Steve Ballmer was at the helm of Microsoft in 2007 when the first iPhone launched, and he was famously dismissive of the device. However, Gates' admission is a reminder that these markets don't appear overnight. He handed over day-to-day management to Ballmer in 2000, staying on as chairman and chief software architect until 2006 when he began reducing his role at the company. So, Gates thinks he could have laid the groundwork for Microsoft to rival Apple in mobile long before the iPhone appeared.

Alas, Google got a head start with Android in 2008, which it acquired in 2005. Android became firmly entrenched in 2009 when the Droid launched on Verizon. Microsoft didn't have a viable competitor until 2010 with the release of Windows Phone 7, but it never gained traction. Microsoft tried to make Windows Phone work for a decade, but the company finally announced it would stop supporting Windows Phone 10 earlier this year.