Stocks climbed Wednesday as investors cheered a report of stronger economic growth. Technology companies, retailers and travel providers all made solid gains.

The Commerce Department raised its estimate for economic growth and said the U.S. gross domestic product grew at its fastest pace in two years between April and June. Along with technology companies and consumer-focused firms, health care companies and banks finished higher. Big names like Microsoft, Amazon and Facebook made some of the biggest gains.

advertisement | advertise on newsday

The Standard & Poor’s 500 index climbed 11.29 points, or 0.5 percent, to 2,457.59. The Dow Jones industrial average picked up 27.06 points, or 0.1 percent, to 21,892.43. The Nasdaq composite gained 66.42 points, or 1.1 percent, to 6,368.31 as technology companies rose for the third day in a row. The Russell 2000 index of smaller-company stocks added 7.64 points, or 0.6 percent, to 1,391.32.

The government raised its GDP projection from last month to a 3 percent annual rate. The second-quarter estimate is much better than the first quarter, when growth was 1.2 percent.

Gasoline prices spiked to two-year highs and oil prices continued to fall as the Gulf region was inundated with rain by Tropical Storm Harvey, which has knocked out significant oil drilling and refining capacity.