WASHINGTON (Reuters) - The U.S. government had a $182 billion budget surplus in April, confounding market expectations for a deficit, according to Treasury Department data released on Wednesday.

The budget surplus was $106 billion in April 2016, according to Treasury's monthly budget statement.

The fiscal 2017 year-to-date deficit was $344 billion compared with $353 billion in the same period of fiscal 2016.

When accounting for calendar adjustments, the surplus last month was $145 billion compared with an adjusted surplus of $146 billion the prior year. The adjusted deficit for the fiscal year to date was $373 billion compared with $314 billion the prior fiscal year period.

Receipts last month totaled $456 billion, up 4 percent from April 2016, while outlays stood at $273 billion, a decrease of 18 percent from the same month a year earlier.

Related:

For more news videos visit Yahoo View, available now on iOS and Android.

(Reporting by Lindsay Dunsmuir; Editing by Andrea Ricci)