The U.S. budget deficit fell to $165 billion in October, down 42% from last year

The U.S. monthly budget deficit fell in October as the government collected more taxes from individuals and corporations thanks to a much improved economy emerging from the coronavirus pandemic.

The Treasury Department reported Wednesday that the federal government posted a deficit of $165 billion last month. That was 42% lower than the same month last year when it rang up a record October deficit of $284.1 billion as revenues declined while spending to deal with the impact of the coronavirus soared.

This October, the first month on the government’s calendar for fiscal 2022, spending fell 14% from last year to $449 billion, while revenues rose 19% to an October record of $284 billion.

Treasury officials said Wednesday that the lower October deficit this year was attributable to more tax revenue from millions more people back working, and booming corporate profits as the economy reopened. Last October, there were still no vaccines and many businesses suffered as people remained holed up at home.

Tax revenue in October was also boosted because those who filed for extensions had their bills come due last month.

The decline in spending from last October to this year was due in part to a decrease in spending by the Department of Education related to coronavirus funding for public schools.

The deficit for the 2021 budget year that ended Sept. 30 totaled $2.77 trillion, the second highest on record. But that was an improvement from the all-time high of $3.13 trillion reached in fiscal 2020. The deficits in both years reflect trillions of dollars in government spending to counteract the devastating effects of a global pandemic.

Before the deficit ballooned during two years of a global pandemic, the biggest deficit had been a shortfall of $1.4 trillion in 2009. At that time, the U.S. was spending heavily to lift the country out of a severe recession following the 2008 financial crisis.

The non-partisan Congressional Budget Office expects the deficit will fall to $1.15 trillion in the current budget year, which began Oct. 1, and will dip below $1 trillion for three years from 2023 through 2025 before rising again above $1 trillion for each year through 2031.

That CBO forecast does not include the spending that will occur from the recently passed $1 trillion infrastructure bill or other potential spending measures in President Joe Biden’s agenda.

The CBO projections are that the deficits over the next decade will add another $12.1 trillion to the national debt.

More politics coverage from Fortune:

Subscribe to Fortune Daily to get essential business stories straight to your inbox each morning.

Read More

Biden AdministrationUkraine InvasionInflationEnergyCybersecurity