Microsoft is all set to get a $250 million windfall when it sells 20% of its estimated 1.8% stake in Facebook in the forthcoming initial public offering (IPO) of the social networking giant.

At the higher end of the proposed $34-$38 per share price band for the IPO, Microsoft's entire stake in Facebook would be valued at about $1.25 billion.

According to the latest regulatory filing by Facebook - Amendment to Form S-1 Registration Statement filed with the US Securities and Exchange Commission on May 15 - Microsoft is selling a little over 6.5 million of its approximately 32.7 million shares in Facebook, which would net Microsoft about $249.1 million. If the underwriters to the Facebook IPO fully exercise their option to purchase additional shares, then Microsoft would net an additional $37 million by selling an additional 983,000 shares. This could boost the current windfall to over $285 million from the IPO.

Microsoft had, in October 2007 or about five years ago, invested $240 million in Facebook in a deal which valued the social networking giant at about $15 billion. At that time it had beaten internet giant Google to the deal.

When Microsoft invested in Facebook, News Corp's was the leader in social networking. However, since then, Facebook has become the undisputed leader in its space leaving rivals way behind.

The current IPO values Facebook at a little over $104 billion at the higher end of the $34-$38 per share price band.