The U.S. deficit for 2021 was $2.77 trillion, which is the second-highest on record. However, it’s a significant improvement over the $3.13 trillion in 2020. Both years’ deficits reflect trillions in government spending to combat the devastating effects of a pandemic.

Friday’s announcement by the Biden administration was that the 2021 budget deficit for the fiscal year ending Sept. 30, 2020 was $360 billion less than 2020. This is because a recovering economy helped to offset government spending on pandemic relief efforts.

Prior to the global pandemic that saw the deficit rise in two years, the largest deficit was $1.4 trillion in 2009. This was because the United States spent heavily on lifting the country from a severe recession after the 2008 financial crisis.

The 2021 joint Treasury and OMB report showed that government spending rose 4.1% to $6.82 trillion. The increase in government revenues by 18.3% was offset. This is a sign of an improving economy, as millions of people who lost their jobs during the pandemic returned to work. Corporate profits also recovered after an awful 2020.

“Under President Biden’s leadership, the U.S. Economy is getting back on track and Americans getting back to work,” Treasury Secretary Janet Yellen and Shalanda Youth, acting director of Office of Management and Budget said in a joint statement.

According to the non-partisan Congressional Budget Office, the deficit is expected to fall below $1.15 trillion in the current fiscal year that began Oct. 1. It will then drop below $1 trillion for three consecutive years (2023-2025), before rising above $1 trillion each year through 2031.

This forecast doesn’t include spending that would occur if Biden can get two pending legislation through Congress. The $1 trillion proposal for traditional infrastructure projects like roads and bridges, and his plan to boost the social safety net to combat climate change are both examples of the spending that could be effected.

Although the safety net measure comes at a cost of $3.5 trillion, it is likely to be reduced to $2 trillion in order to address concerns of moderate Democrats like Sen. Joe Manchin from West Virginia.

The 2021 deficit is 12.4% of the GDP as a percentage of overall economic activity, measured by gross domestic product. This is a decrease from the 15% deficit in 2020.

Young and Yellen both credited Biden for reducing the deficit in their comments. They cited Biden’s economic policies as contributing to a lower budget, such as his “swift action” to mount a historic vaccine effort and his success in getting Congress approved $1.9 trillion more spending in March’s stimulus bill.

Yellen stated that “while the nation’s economic recovery has been stronger than other wealthy nations, it remains fragile.” “To build on the progress made, Congress should approve President Biden’s Build back Better plan.”