By Corrie Driebusch 

U.S. stocks ended the trading day little changed Thursday as investors focused on the latest batch of corporate earnings.

The pause follows two days of solid advances that position the Dow Jones Industrial Average to end a tumultuous trading month with slight gains.

On Thursday, U.S. stocks started the day in the red following data that indicated the U.S. economy has yet to fully rebound from a weak start to the year.

The Commerce Department said Thursday that U.S. economic output in the second quarter expanded at an annual rate of 2.3%. Economists surveyed by The Wall Street Journal had expected the rate of growth to be 2.7%.

The government also said that first-quarter GDP, or the broadest sum of goods and services produced across the economy, grew at a 0.6% rate, an upward revision from a previously reported 0.2% contraction.

Major indexes pared their losses, though, and spent the afternoon hovering near the flat line.

The Dow industrials ended the day down 5.41 points, or 0.03%, at 17745.98. The S&P 500 added 0.06 point to 2108.63, while the Nasdaq Composite Index rose 17.05 points, or 0.3%, to 5128.78.

The Dow industrials are up 0.7% for July, but remain down 0.4% for the year.

On the other side of the Atlantic, the Stoxx Europe 600 rose 0.6%.

"The economy continues to grow, but we're not seeing the kind of growth everybody wants," said Brad McMillan, chief investment officer at Commonwealth Financial Network. Still, he said he believes moderate growth is good for stock investors, because it means the U.S. Federal Reserve will take its time to raise short-term interest rates.

"You can certainly argue that growth is not 3% or 4% and that's terrible, but if we saw consistent 3% to 4% growth, we'd see the Fed tightening much faster than people are expecting," Mr. McMillan said.

Because of this moderate, sustainable growth, the Fed will continue to employ stimulative monetary policy, he added. "The Fed is not going to take the punch bowl away, they're just going to be spiking it a little bit less," he said.

Investor focus has returned to economic data after Wednesday's U.S. Federal Reserve policy statement, in which the central bank didn't give a clear signal on when it would raise interest rates.

"The FOMC didn't produce a clear signal on when the first rate hike will be," said Craig Bishop, lead strategist of U.S. fixed-income strategies at RBC Wealth Management. "Between today's GDP number and the jobs numbers we get a week from tomorrow, that will be key to what the Fed does or doesn't do."

Many investors had expected the Fed to raise interest rates as early as September, but Wednesday's statement from the central bank flagged concerns that inflation remains too low.

Earnings reports continued to move individual stocks. So far, second-quarter results have largely been exceeding muted expectations. Including results from 322 companies in the S&P 500, earnings are on track to fall 0.9%, according to FactSet, better than the 4.5% decline initially expected by analysts.

On Thursday, Procter & Gamble Co.'s shares fell 4% after sales growth decelerated at the consumer products company and it hinted that profit might decline for its new business year.

Facebook Inc. shares fell 1.8% after the social-networking company posted a 39% increase in quarterly revenue but said expenses grew faster than revenue.

Shares of Whole Foods Market Inc. tumbled 12% after the natural-foods grocer said sales growth slowed sharply last month

In Europe, earnings season was also in focus.

Shares of Royal Dutch Shell PLC rallied after the oil company reported a sharp drop in second-quarter profit and said it would cut 6,500 jobs, illustrating the strain that sustained low oil prices were putting on large producers.

In Asia on Thursday, the Shanghai Composite closed down 2.2% after snapping a three-day losing streak on Wednesday, while the Nikkei Stock Average ended the session up 1.1%, helped by a weaker yen.

In debt markets, the yield on the benchmark 10-year U.S. Treasury note was at 2.268%, compared with 2.279% on Wednesday.

In commodity markets, crude-oil futures fell 0.6% to $48.52 a barrel. Gold ticked down 0.4% to $1,088.40 per ounce.

Josie Cox

contributed to this article.

Write to Corrie Driebusch at corrie.driebusch@wsj.com