The federal government ran a deficit of $2.7 billion in the first five months of its fiscal year compared with a deficit of $5.4 billion in the same period last year.

In its monthly fiscal monitor, the federal Finance Department says the smaller deficit for the year so far came as revenue grew more than spending.

Revenues were up $6.3 billion, or 5.3 per cent, as income tax revenues and excise taxes and duties rose, partially offset by lower EI premium revenues and other revenues.

Program spending was up $4.2 billion, or 3.7 per cent, due to increases in major transfers to persons and other levels of government and direct program expenses.

Public debt charges were down $700 million, or 6.1 per cent.

In its fall fiscal update this week, the government said it's expecting a shortfall of $18.4 billion in 2017-18, compared with a projection of $25.5 billion outlined in the spring budget.