US stocks popped on Wednesday as investors digested a cooler-than-expected reading on inflation as the Federal Reserve held interest rates unchanged and projected just one rate cut this year, fewer than the two markets had been anticipating.

The S&P 500 (^GSPC) built on a 27th-record close of the year, rising nearly 1%. The tech-heavy Nasdaq Composite (^IXIC) rose nearly 1.7%, also adding to a record close from the prior day. The Dow Jones Industrial Average (^DJI) was near the flat line.

The Consumer Price Index (CPI) remained flat over the previous month and rose 3.3% over the prior year in May — a deceleration from April's 0.3% month-over-month increase and 3.4% annual gain in prices. Both measures beat economist expectations. On a "core" basis, which strips out the more volatile costs of food and gas, prices in May climbed 0.2% over the prior month and 3.4% over last year — cooler than April's data. Both measures also came in better than economist estimates.

This shifted market expectations for Fed rate cuts this year. Following the data's release, markets were pricing in a roughly 69% chance the Federal Reserve begins to cut rates by its September meeting, according to data from the CME FedWatch Tool. That's up from about a 53% chance the day prior.