The numbers: The U.S. economy sped up toward the end of 2021 before a late omicron surge, expanding at an annual 6.9% pace as consumers spent more and businesses stocked back up.

Economists polled by The Wall Street Journal had forecast gross domestic product to rise by 5.5% in the fourth quarter. GDP grew a slower 2.3% in the third quarter. The figures are adjusted for inflation.

Aided by massive government stimulus spending, GDP increased by 5.7% for the full year. That’s the biggest gain since 1984.

Before the pandemic, the economy was grow around 2% to 2.5% a year.

Big picture: The U.S. economy, harried first by delta and then by omicron, has grown in fits in starts since last summer.

Yet Americans have plenty of savings and businesses say demand is as high as ever. Economists predict the U.S. will grow strongly again — around 4% or so — in 2022 despite the end of government stimulus, especially if the coronavirus is kept at bay.

The chief obstacles? Ongoing shortages of labor and supplies that have boosted inflation to a nearly 40-year high. The Federal Reserve is also on the cusp of raising interest rates for the first time in four years to combat the spike in prices.

Key details: Consumer spending, the main engine of the economy, rose a solid 3.3% in the fourth quarter. Outlays had risen a smaller 2% in the third quarter.

The value of inventories soared by $240 billion — one of the biggest increases in decades — as companies ramped up production to try to meet demand. Higher inventories are boost to GDP, and they were an especially big boost in the fourth quarter.

Business investment — not including housing — rose a tepid 1.3%. And investment in housing declined for the third quarter in a row.

Government spending fell 2.9% after most of the stimulus approved earlier in the year dried up.

Exports jump 24.5% in the fourth quarter and imports advanced 17.7%. Yet the U.S. is expected to post a record trade deficit in 2021 owing to a rapid increase in demand for foreign goods.

The rate of inflation grew at an 5.5% annual rate in the fourth quarter. Prices rose in 2021 at the fastest clip since 1982.

Market reaction: The Dow Jones Industrial Average and S&P 500 were set to open higher in Thursday trades. Stocks fell the day before after the Fed indicated it could raise interest rates as early as March.