The budget year begins on Oct. 1. The size of the annual deficit will hinge, in part, on how Congress and the White House resolve a debate over raising the nation’s borrowing limit. Republicans are demanding deep spending cuts in return for any increase.

The deficit, in simplest terms, is the amount of money the government has to borrow when revenues fall short of expenses. The monthly figures are volatile and can be affected by calendar quirks that shift payments from one month to another.

Much of the December gain in revenue occurred because some companies accelerated bonuses or other payments into 2012 to avoid the possibility of higher taxes in 2013.

And spending fell last month partly because the government provided $14 billion to the mortgage giants Fannie Mae and Freddie Mac in December 2011, after they had lost hundreds of billions from defaulted mortgages in the housing bust. The government didn’t make any such payments last month.

The White House and Congress agreed last week to raise taxes on the wealthiest 2 percent of Americans this year as part of a deal to avoid the fiscal cliff. That deal also allowed a Social Security tax cut to expire. But the groups also postponed for two months the implementation of spending cuts that were included in the cliff.

Those cuts are now scheduled to kick in at around the same time the borrowing limit will be reached. And funding authority for most government programs will expire at the end of March.

The government has run annual deficits for more than a decade, although President Barack Obama’s presidency has coincided with four straight $1 trillion-plus deficits.

The deficit reached a record $1.41 trillion in budget year 2009, which began four months before Obama was inaugurated. That deficit was largely because of the worst recession since the Great Depression. Tax revenue plummeted, while the government spent more on stimulus programs.

The budget gaps in 2010 and 2011 were slightly lower than the 2009 deficit as a gradually strengthening economy generated more tax revenue.

President George W. Bush also ran annual deficits through most of his two terms in office after he won approval for broad tax cuts and launched wars in Afghanistan and Iraq.