TOKYO, May 26 (Reuters) - Japanese shares eked out small gains on Wednesday, capping the fifth straight session of rises but lacked traction with uncertainties on global inflation and domestic infections keeping investors from testing major resistances on the upside.

The Nikkei share average added 0.31% to 28,642.19, extending its recovery from a four-month low hit earlier this month, but it faced multiple resistances around the current levels, including the 25-day average at 28,717 and 100-day average at 28,933.

The broader Topix ticked up 0.06% to 1,920.67.

"Lots of players, prop traders, retails and quants, are all active in range-trading around the current levels," said Takeo Kamai, head of execution services at CLSA.

In the very near term, the market is also capped by expectations of outflows due to MSCI's regular rebalance on Wednesday, as 29 Japanese shares will be excluded from its main index.

Few investors are eager to test the upside as they assess whether the risk inflation in the United States and elsewhere hastens fast enough to prompt central banks to reduce its monetary stimulus.

Domestically, elevated COVID-19 infections remain a problem as the government appears to push ahead with holding the Olympics in July despite health warnings against it.

Despite the small gains in the index, only about a third of shares rose while nearly two-thirds declined on the main board.

Among gainers, Recruit Holdings rose 2.6% to hit a record high, extending its bull run since its earnings announcement earlier this month.

Internet firm Z Holdings rose 3.4% in heavy trade, while Panasonic gained 3.6%.

On the other hand, steelmakers succumbed to profit-taking after their heavy gains so far this year, with Nippon Steel falling 4.4% and Kobe Steel losing 3.5%.

(Reporting by Hideyuki Sano; editing by Uttaresh.V and Subhranshu Sahu)