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

Bing has been winning market share from rivals, according to industry data released this week. Microsoft 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's 65 percent of U.S. searches in May.

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 luncheon in Chicago, without elaborating on the timeframe.

We invested in Xbox for years and now it generates nice economic returns for us, he said, referring to the company's popular gaming console.

Microsoft's Bing, unveiled fully in June, is just the opening salvo in a 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.

Shares of Microsoft fell 0.5 percent at $23.56, versus a slight gain in the Nasdaq composite index late Thursday.

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