Feb 9 (Reuters) - S&P 500 vaulted past the 5,000 milestone for a second day and Nasdaq surpassed 16,000, with boosts from megacap stocks and chip companies, including Nvidia as investors bet on artificial intelligence technology and eyed strong earnings data.

Nvidia gained ground and hit a record high after Reuters reported it was building a new business unit focused on designing bespoke chips for cloud computing firms and others, including advanced artificial intelligence (AI) processors.

This was after the Wall Street Journal reported Thursday that OpenAI Chief Executive Sam Altman was in talks with investors to raise funds for a tech initiative intended to boost chip-building capacity for power AI, among other things.

"The AI story so far has been all about building the infrastructure, the chips, the data centers," said David Lefkowitz, head of U.S. equities at UBS Global Wealth Management, adding that the report "at least underscores that there's potentially a tremendous amount of demand going forward for AI infrastructure."

While Lefkowitz said the S&P and Nasdaq's round number milestones likely won't change investors calculations of the markets risk and reward prospects, he said, "it raises the profile of what's happening in the market."

Along with outperformance by the Philadelphia semiconductor index, technology-focused market heavyweights, including Microsoft, Amazon.com and Alphabet were also contributed hugely to index gains.

With results in from about two-thirds of S&P 500 companies, LSEG data now shows Wall Street estimates for fourth-quarter earnings growth of 9.0% versus expectations for 4.7% growth on Jan. 1 while 81% of companies are beating estimates, compared with a 76% average in the previous four reporting periods.

"Earnings have been strong so far, above expectations," said Tim Ghriskey, senior portfolio strategist at Ingalls & Snyder in New York, New York. "And there was news about additional growth opportunities for Nvidia specific to cloud computing, another growth area besides AI. Those are the big drivers."

According to preliminary data, the S&P 500 gained 27.98 points, or 0.56%, to end at 5,026.29 points, while the Nasdaq Composite gained 196.95 points, or 1.25%, to 15,987.69. The Dow Jones Industrial Average fell 59.19 points, or 0.16%, to 38,666.29.

Positive earnings and the boost from AI optimism has helped the S&P 500 to notch 10 intraday record highs so far this year.

Earlier, data showed U.S. monthly consumer prices rose less than initially estimated in December, but underlying inflation remained a tad warm - a mixed picture that clouded expectations on the timing of interest-rate cuts from the Federal Reserve.

Strong economic data and hawkish comments from Fed policymakers in recent days have dashed hopes the central bank would start cutting interest rates in March.

But Ghriskey points to Fed official predictions in the "dot-plot," which still imply a rate cut this year.

"The market does have the Fed's wind at its back. Seemingly we've reached the top of interest rates. The next move is going to down. We don't know when that's going to be. The Fed keeps throwing cold water on that idea but their votes with the dots say they're going to be easing in the second half."

Market participants are awaiting data on January consumer prices next week for more clues on when the Fed will cut borrowing costs.

PepsiCo fell after its fourth-quarter revenue fell short of estimates as multiple price increases crimped demand for its juices and Lay's crisps.

Pinterest shares sank after it forecast first-quarter revenue largely below Wall Street estimates, while Cloudflare rallied as it forecast upbeat first-quarter revenue and profit. (Reporting by Sinéad Carew in New York, Sruthi Shankar and Johann M Cherian in Bengaluru; Editing by Pooja Desai, Shounak Dasgupta and Aurora Ellis)