The federal deficit fell to $486 billion in fiscal 2014, the Congressional Budget Office estimated Wednesday, the smallest budget shortfall since fiscal 2008.

At just 2.8 percent of U.S. gross domestic product, the deficit in 2014 was the smallest share since fiscal 2007 and below the 40-year average for deficits of roughly 3 percent, the CBO said.

The CBO's estimate is based on complete daily data from the Treasury through Sept. 30, the last day of fiscal 2014. The annual deficit for 2014 is $195 billion below last year's deficit and $20 billion less than the CBO projected as recently as August.

The improvement in the government's finances was mostly driven by rising revenue. At just over $3 trillion, revenues were up 9 percent, or $239 billion, from the year before. Most of that growth was from rising individual taxes, reflecting the ongoing improvement in the economy and the higher tax rates on payrolls and high-income earners.

Total spending was up 1 percent to just under $3.5 trillion.

The Treasury plans to report the official deficit for 2014 later this month.