When will the world see its first trillionaire? A British charity estimates that it could happen within 25 years and that it will be none other than Microsoft founder Bill Gates.

Oxfam, the U.K. world hunger organization, meant to shame the world's richest with its list of multi-billionaires. Which is odd, considering that Gates is a founder, with Warren Buffett, of The Giving Pledge and has spent billions through his foundation fighting tropical disease and hunger.

No matter. The news media blew right by the wealth concentration story and focused instead on the idea of one person on the planet controlling $1 trillion, even if he expects to give at least half or more of it away before dying, as The Giving Pledge requires.

So how did this happen? Simply enough, Gates is making money faster than he can spend or give it away. Ultimately, it's a lesson about the power of compounding, one that's applicable to any nest egg of any size.

Oxfam puts Gates's fortune not tied up in his foundation at $75 billion, up from $50 billion when he left Microsoft MSFT, -1.24% 10 years earlier.

One would expect the number to be $100 billion. After all, a decade's return in the S&P 500 SPX, -1.11% would have been 7.7% annualized during that period, sufficient to double his money.

However, Gates started his namesake foundation in 2000 and presumably funded it heavily after leaving the company he founded. There's no reason he can't fund it even more and surely he does.

Foundation or not, Gates is in fact in a foot race with the reality of compounding wealth.

How to invest and do good

If Gates does nothing it's very likely that $75 billion will turn into well over $1 trillion. At an 11% annualized return, Oxfam's assumption, a decade from now it should be $213 billion, then $605 billion, then over $1 trillion at the end of 25 years.

Oxfam assumes that Gates is getting a return closer to that experienced by wealthy investors with access to endowment-style advisors. While a complete guess on their part, if true that would push Gates into trillionaire territory by the time he turns 86. He's a relatively young 61 today.

The takeaway for retirement investors, however, is not that Gates, Buffett and similarly wealthy people have better advisors than the rest of us. Of course they do.

Not, the real lesson is that the lion's share of the investment success these men obtain is available to ordinary people at very little cost, and certainly far less than the princely sums they pay.

A long bet

First off, Oxfam's guesstimate doesn't take into account the cost of Gates's many advisors and taxes. But let's imagine you have money to invest and choose to buy an index fund, then let it ride for 10 years. What would happen?

That's exactly what Warren Buffett did, as he details in his most recent letter to shareholders. He took a highly publicized "long bet" that his investment in the S&P 500 Index would best a collection of expensive, actively managed hedge funds selected by an expert.

As of 2016 the index fund had returned 7.1% while the hedge funds returned 2.2%. As Buffett put it, "That means $1 million invested in those funds would have gained $220,000. The index fund would meanwhile have gained $854,000."

There is one year left in the bet. Buffett will have doubled his investment or nearly so within a decade, just by owning the market.

Is 7.1% the same as 11%? No, it is not. But 7% at a very low management cost over 25 years will turn even modest regular contributions into an IRA into a serious retirement next egg for sure.

The point is to invest, stay invested and get into your own financial foot race with the reality of compounding. Make your money outrun you to the finish line and you will retire with more.