We all make mistakes--it's part of being a human--and through the mistakes we make, we learn valuable lessons that can help us improve in the future. However, when you're someone like Bill Gates, a mistake can result in a loss of literally billions of dollars.

In fact, in a recent interview with venture capital firm Village Global, Bill Gates admitted that the "greatest mistake ever" in his fabled career as co-founder of Microsoft cost his company $400 billion.

And what was the mistake that Bill Gates was talking about?

Losing out to Google's mobile phone operating system Android in the competition over which tech company would dominate the non-Apple phone alternative. Said Gates in the interview:

You know, in the software world, in particular for platforms, these are winner-take-all markets. So, you know, the greatest mistake ever is the whatever mismanagement I engaged in that caused Microsoft not to be what Android is, [meaning] Android is the standard non-Apple phone form platform. That was a natural thing for Microsoft to win.

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 what's that worth? $400 billion that would be transferred from company G [Google] to company M [Microsoft].

As you might recall, Apple's iPhone was released to the public in June 2007, while the first Google Android-based smartphone was offered to the public a little more than a year later, in September 2008. The Windows Phone 7 wasn't introduced until October 2010.

Today, it's estimated that together, Android and Apple iOS have a market share of 99.9 percent--obliterating the competition.

So, while Microsoft may have lost $400 billion because of its missteps in the mobile phone market, the company hasn't suffered too much as a result. As a CNBC article points out, Microsoft's market cap ($1 trillion) is currently higher than either Apple ($918 billion) or Alphabet/Google ($776 billion).

But as Bill Gates explained in his Village Global interview, if Microsoft had beat out Android in the mobile phone wars, it wouldn't just be a leading company, Microsoft "would be the company."