Microsoft Corp is willing to invest up to 10 percent of its operating income in its Internet search business for up to five years, Chief Executive Steve Ballmer said on Thursday, as its Bing search engine starts to gain ground with Web surfers.

Bing -- part of Microsoft's perennially money-losing online services unit -- has been winning market share from rivals, according to industry data released this week, but still trails market leader Google by a long way.

Our shareholders, I told them we were willing to spend 5 to 10 percent of operating income for up to five years in this business, and we feel like we can get an economic return, Ballmer told a business lunch in Chicago, without elaborating on the timeframe.

The new search engine grabbed 12.1 percent of U.S. Internet searches for the June 8-12 work week, up from 11.3 percent from June 1-5 but trailing Google Inc's 65 percent of U.S. searches in May.

You don't go from 8 percent to 80. You have to be patient, said Ballmer. We invested in Xbox for years and now it generates nice economic returns for us, he added, referring to the company's popular gaming console.

Microsoft reported operating income of $4.4 billion last quarter, which would mean Ballmer is envisaging spending up to $440 million per quarter, or almost $1.8 billion per year, developing Bing.

Microsoft does not break out investment in its various projects, so it's not clear if that is a significant increase on previous spending. Microsoft has continued to invest in Internet projects, even though its online services business is a net drain on cash, losing $575 million last quarter alone.

Bing, fully launched on June 3, is just the opening salvo in Microsoft's campaign to counter the dominance of Google in the Web-search and related advertising business.

The world's largest software company, which is in talks with Yahoo Inc over a potential partnership, has long been determined to play a role in that lucrative space after watching rival Google take a stranglehold on the market.

Ballmer regretted that Microsoft had not entered the Internet search market earlier, saying that the company understood the technology's importance, but had not come up with a way to monetize it.

If we could have one do-over I would probably say I would start sooner on search, said Ballmer. Sometimes the error you make is what you don't do and don't see. Our mistake wasn't that we didn't see the technology change coming, we didn't see the business change coming.

Shares of Microsoft closed down 0.8 percent at $23.50 on Nasdaq.

(Reporting by Ian Sherr; Writing by Edwin Chan and Bill Rigby; Editing by Tim Dobbyn and Richard Chang)