Despite the strong spending, many lower-income Americans struggled|Anthony Quintano|CC BY 2.0

The economy grew faster than expected in the third quarter. The gross domestic product (GDP) rose 4.3% from July to September, the fastest annual pace in two years, according to the Commerce Department.

GDP measures all goods and services produced in the country. The Q3 growth beat the 3.2% forecast and was up from 3.8% in the previous quarter.

Growth was driven by higher spending on healthcare, including hospitals and nursing homes, as well as on travel, legal services, and technology products such as computers and software. Investment in artificial intelligence projects provided a small boost, though AI growth slowed compared with earlier in the year.

Despite the strong numbers, inflation rose slightly, and many lower-income Americans struggled as their paychecks barely kept up with rising prices. Spending on homes and big business projects also fell, showing uneven growth across the economy.

Overall, Americans’ spending is keeping the economy moving, even amid challenges.