TOKYO - Japan's Nikkei share average surged to an all-time high on Thursday, crossing 42,000 points for the first time as an overnight rally in U.S. stocks boosted investor sentiment.

The Nikkei ended 0.94% higher at 42,224.02, securing a third consecutive record high close this week. The benchmark index had hit a record intraday high of 42,426.77 points in early trading.

The broader Topix finished up 0.69% at a record high close of 2,929.17.

All three of Wall Street's main stock indexes performed strongly on Wednesday ahead of inflation data and quarterly earnings reports due this week, kicking off a widespread rally in Japanese shares.

Of the Nikkei's 225 constituents, 180 shares advanced, including index heavyweight and Uniqlo parent firm Fast Retailing which gained 2.3% to give the index the biggest lift.

Semiconductor-related shares followed their U.S. peers higher after strong quarterly revenue results from Taiwan Semiconductor Manufacturing Co, the world's largest contract chipmaker.

Tokyo Electron rose 0.6% and Disco Corp climbed 3.4%.

Sumco jumped 5.9% to become the largest gainer by percentage on the Nikkei.

AI-focused startup investor SoftBank Group was up 0.8%.

Other tech shares also marched higher, including Sony Group and Fanuc which were up 3.6% and 1.4% respectively.

Japanese equities have climbed to all-time highs over the past two weeks, with analysts citing further yen depreciation and more perceived certainty in the market regarding the outcome of this year's U.S. presidential election as reasons.

Analysts expect Japanese shares to see further momentum as companies report earnings this month.

"This earnings season, Japanese corporate earnings are likely to be better than expected because of the degree of yen depreciation," Kenji Abe, chief strategist at Daiwa Securities said.

"There may be some further increases in equity prices as we see good earnings reports from companies," potentially pushing the Nikkei as high as 42,600 or 42,700 points, he said.

The Nikkei is up 25% for the year so far.

(Reporting by Brigid Riley; Editing by Mrigank Dhaniwala and Varun H K)