According to new Monthly Treasury Statement , the U.S. posted a $116.5 billion budget surplus in June.

Revenue climbed 10.2% to $286.6 billion, while outlays plunged 46.8% to $170.1 billion.

This is the biggest surplus since April 2008.

This was also higher than the $115 billion surplus expected by the CBO and by economists surveyed by Bloomberg.

"Some of the swing in the budget in today’s report for June will be exaggerated by calendar quirks and a payment from Fannie Mae, but the trend is clearly toward improvement," said High Frequency Economics' Jim O'Sullivan before the statement was released.

"The deficit has dropped to an estimated 4.4% of GDP in the past four quarters from 8.0% in the previous four quarters and more than 10% at the peak in 2009. The downtrend has reflected strength in revenues as well as weakness in outlays. Some of the strength in revenues is the result of higher tax rates, but the data also suggest that GDP may have been undercounted."

"Without those calendar shifts, the difference between the surplus in June and deficit last year would have been $102B," said UBS's Maury Harris ahead of the statement.

Fiscal year-to-date, the budget deficit sits at $510 billion.

"If the current laws that govern federal taxes and spending do not change, the budget deficit will shrink this year to $642 billion, the Congressional Budget Office (CBO) estimates, the smallest shortfall since 2008," said the Congressional Budget Office in May.

All of this comes as the U.S. economy tries to gain steam amid a fiscal drag, which included the dreaded sequester.