Expansion in the second quarter — faster than the annualized growth rate in the first quarter of 1.1 percent — was driven by gains in consumer spending, exports, private inventory investment, nonresidential fixed investment and residential fixed investment. Residential fixed investment, which reflects the sharp rebound in housing construction, has been one of the brightest spots in the economy so far this year, growing at an annualized rate of 12.9 percent in the second quarter and 12.5 percent in the first.

The shrinking government continues to drag on the economy. State and local government spending has declined almost every quarter for the last four years, and federal government spending fell during about half of those quarters. The upward revision to gross domestic product last quarter primarily reflected the fact that exports turned out to be higher than initially estimated and imports were actually slightly lower.

“The good news is that the economy accelerated in the second quarter to a degree that was even better than expected,” said James M. Baird, chief investment officer for Plante Moran Financial Advisors. “However, it’s also clear that wary consumers and businesses haven’t fully bought in to an imminent return to more robust growth and will not go ‘all in’ on spending and investment.”

The revisions seemed to further convince economists that the Federal Reserve will begin tapering its large-scale asset purchases at its September meeting. The Fed chairman, Ben S. Bernanke, has said that the central bank would slow these stimulus measures later this year, but did not specify when.