The U.S. economy expanded at a 4.3 percent annual rate in the third quarter, marking its strongest growth in three years, according to revised government figures released Wednesday.

The Bureau of Economic Analysis raised its initial estimate of gross domestic product growth from 3.4 percent to 4.3 percent, significantly exceeding economists’ expectations of a 3.5 percent revision. The updated figure also nearly doubled the 2.2 percent growth rate recorded in the second quarter.

Consumer spending and private fixed investment, adjusted for inflation, increased at a combined annual rate of 5.8 percent. The measure, known as real final sales to private domestic purchasers, excludes inventory changes, government spending and net exports. It was previously estimated to have grown 4.9 percent.

Household spending rose 4.2 percent, compared with the earlier estimate of 3.8 percent. Revised figures showed Americans spent more than initially calculated on prescription drugs, computer software and accessories, and gasoline. Spending on services was adjusted downward, primarily because of lower estimates for health care.

Business investment also proved stronger than previously reported. Fixed investment by businesses climbed 16.1 percent, up from the initial estimate of 12.7 percent. Spending on equipment surged 21.8 percent, while investment in structures increased 9.5 percent. Updated software price data accounted for much of the upward revision in business investment.

Residential investment remained a drag on growth, falling 3.4 percent during the quarter.

Inventory accumulation contributed 1.64 percentage points to overall GDP growth, while international trade reduced growth by 3.21 percentage points as imports increased and exports declined.

A separate measure of economic activity, real gross domestic income, rose 4.4 percent in the third quarter, accelerating from 2.3 percent in the previous quarter. Gross domestic income measures the income generated throughout the economy and provides another gauge of economic performance alongside GDP.