U.S. stocks rose, boosted by a series of better-than-expected earnings reports, as investors digested a critical interest-rate decision from the Federal Reserve. 

The S&P 500 climbed 1.4% Wednesday, rebounding a day after the broad benchmark index fell 1.2%. The Dow Jones Industrial Average advanced 0.3%, and the Nasdaq Composite jumped 2.5%.

Shares of megacap technology companies jumped after Microsoft and Google parent Alphabet reported earnings that were better than investors feared.

“The market is bearishly positioned,” said Tim Leary, a high-yield bond portfolio manager for RBC Global Asset Management. “Trading volumes have been thin. You get a whiff of good news and it doesn’t take much to have a market rally.”

Microsoft, despite suffering its slowest earnings growth in two years, gave an upbeat outlook for its full-year guidance, sending shares 4.7% higher. Alphabet shares advanced 6.5% after its results, which showed slowing sales growth, came in better than investors expected.

It is a pivotal and busy week in financial markets, and traders around the world were studying the interest-rate decision from the Fed. The U.S. central bank lifted its federal-funds rate by 0.75 percentage point, to a range between 2.25% and 2.5%, Wednesday afternoon.

Investors will be watching for any clues from central bankers on the size of further interest-rate increases this year—and whether officials expect to then turn around and begin cutting rates next year.

The U.S. stock market has performed well on days when the Fed has raised rates this year, Bespoke Investment Group noted Tuesday. Still, a 0.75-percentage-point increase Wednesday marks the Fed’s second consecutive increase of that magnitude this year. The Fed hasn’t lifted rates that quickly since the 1980s.

“We want to hear what [Fed Chairman Jerome] Powell is thinking about the inflation outlook and what he is thinking about the growth outlook,” said Seema Shah,

chief global strategist at Principal Global Investors. “But we have to be careful. We’ve learned in the last couple of months that we can’t read too much into any broad guidance.”

In the bond market, the yield on the benchmark 10-year U.S. Treasury note edged up to 2.792%, from 2.786% Tuesday. Yields rise when bond prices fall. The yield on the two-year note, meanwhile, rose to 3.063%, from 3.041% the day before.

Short-term yields have been elevated this year as investors prepared for the Fed to keep aggressively raising interest rates, keeping the U.S. Treasury yield curve inverted. That signal is often seen as a key recession predictor.

Stocks are on track to close July with gains, though many investors don’t expect gains to be long-lasting. 

“It doesn’t mean that a recession isn’t going to happen within the next couple of quarters,” Ms. Shah said. “This is your ultimate bear-market rally.”

Investors have grown increasingly worried that the Fed could plunge the U.S. into a recession through tighter policy. Second-quarter gross-domestic product data on Thursday will provide insight into the economy’s recent performance.

Investors are also monitoring earnings results this week, the busiest of the earnings season, for clues about how companies are navigating decades-high inflation.

In earnings Wednesday, Shopify warned it expects higher inflation and rising rates to pressure consumers’ wallets, and noted that the strength of the U.S. dollar weighed on results. The company reported a loss in the second quarter. The Wall Street Journal reported this week that the company is cutting 10% of its global workforce. Its stock added 6.3%, a day after falling 14%.

Sherwin-Williams fell 9.5% after reported a decline in profit amid lower-than-expected sales, as the paint-and-coating manufacturer contended with high raw-material costs.

Boeing reported a drop in sales and profit as it awaited regulatory approval to resume deliveries of its wide-body 787 Dreamliner. Its shares were down 0.2% even after the company said it expects positive free cash flow for 2022.

Results from Spotify Technology and Hilton Worldwide Holdings offered investors some good news. Spotify shares climbed 12% after the music-streaming giant reported accelerated user growth and a rise in advertising revenue for the second quarter. Hilton Worldwide Holdings shares jumped 5.4% after the hotel chain raised its full-year earnings guidance.

Shares of growth and technology companies also rallied, pacing the S&P 500’s gains. Information-technology stocks in the broader index rose 2.3%.

PayPal Holdings jumped 11% after the Journal reported that activist investor Elliott Management Corp. has a stake in the company. 

Stocks are on track to close July with gains, though many investors don’t expect gains to be long-lasting.

Photo: Spencer Platt/Getty Images

Overseas, the Stoxx Europe 600 advanced 0.5%. Credit Suisse shares added 1% after the Swiss bank named a new chief executive and reported earnings that were worse than analysts expected. Shares of Deutsche Bank fell 1.6% after the bank, which reported a sharp rise in second-quarter profit, warned that the months ahead will be challenging.

In energy markets, Brent crude, the international benchmark for oil prices, rose 0.6% to $100.03 a barrel.

In Asia, Hong Kong’s Hang Seng Index fell 1.1%, while China’s Shanghai Composite lost about 0.1%. Japan’s Nikkei 225 gained 0.2%.

Justin Baer contributed to this report.

Write to Caitlin McCabe at caitlin.mccabe@wsj.com