The federal government posted a surplus of $3.9 billion in April and May and is on track to balance the budget for the 2015 fiscal year as a whole, the Department of Finance said Wednesday.

Ottawa's fiscal year starts in April and for the first two months of the year the government posted a surplus, the department said. For comparison purposes, in the same period last year the government posted a $1.1 billion deficit.

During April and May revenues increased by $5.5 billion, or 12.8 per cent, largely reflecting increases in income taxes, excise taxes and duties, the government said. 

"Personal income tax revenues were up $1.9 billion, or 9.2 per cent, in the April to May 2015 period while corporate income tax revenues rose $0.5 billion, or 9.0 per cent."

All in all, Ottawa took in $49.05 billion compared with $43.5 billion last year.

That revenue figure also includes proceeds of the sale of the government's remaining stake in GM, which went through in April when Ottawa sold more than 73 million shares in the company. In response to a CBC query, the government says it raised a net gain of $2.1 billion for government coffers from the GM share sale.

The revenue bump offset expenses, which were up $0.6 billion, or 1.5 per cent compared to last year.

The government's official numbers come on the same day as a separate report from the Parliamentary Budget Officer predicting that due to the economic slowdown, the government will post a deficit of $1 billion this year.

The government's budget projection, known as the Fiscal Monitor, was set to be released no later than July 31. Ottawa tends to release the monthly surplus or deficit numbers in the last week of the month, but for April and May, the Finance Department released the monthly budget numbers on Wednesday — earlier than usual and an hour before the PBO's report was scheduled to come out.