A stronger economy created more jobs and income over the past year, which generated greater tax revenue. At the same time, the Obama administration and Congress agreed in January to end a temporary cut in Social Security taxes and also to raise income taxes on the wealthy.
And spending fell in part because of across-the-board cuts that took effect in March.
The Obama administration and Republicans in Congress are now engaged in another battle over the budget and Obama's health insurance program. That led to a 16-day partial government shutdown this month.
And while the parties reached a deal to re-open the government this month, it contained an agreement to only fund government operations until Jan. 15 and suspend the government's borrowing limit until Feb. 7.
A House-Senate conference committee met on Wednesday for the first time since the shutdown. They are hoping to reach a deal that would remove the threat of another shutdown and ease fears of a debt default.
The Obama administration stressed in announcing the 2013 results that the government is succeeding in reducing the deficit from the record levels that had been hit.
"It is now less than half of what it was when the president took office," Treasury Secretary Jacob Lew said in a statement.
The $680.3 billion deficit for the just-completed budget year represents 4.1 percent of the total economy, down from 6.8 percent last year. In dollar terms and not adjusted for inflation, the deficit is still the fifth-largest in history. It was exceeded only by four straight deficits above $1 trillion. The record deficit was $1.4 trillion set in 2009, Obama's first year in office.