OTTAWA - The federal Finance Department doesn't expect to have a balanced budget until 2040, but that's five years earlier than the government predicted last year.

Long-term budgetary projections released Friday morning estimate that by the end of fiscal year 2040-2041, federal books will be in surplus by $1.7 billion.

The Trudeau Liberals promised during the 2015 election to balance the books by the end of their mandate -- 2019 -- after running small deficits.

The government's February budget predicted a deficit of $18.1 billion for the current 2018-19 fiscal year, which ends in March.

The report says federal finances appear sustainable over the long term, with the government's favoured fiscal number, the federal debt as a percentage of gross domestic product, expected to decline over time. That's a way of measuring how heavy the debt burden is compared with the size of the national economy rather than just tallying the total the federal government owes.

The government's debt, which as of October stood at $669.5 billion, is expected to peak at almost $960 billion in the same year the budget reaches balance, the report says.

But the Finance Department warns the projections are based on a number of assumptions about population and economic growth, making the projects "subject to a fair degree of uncertainty." Nor do they take into account any new government spending or taxes over the coming years.

Ottawa ran a small surplus of $92 million through the first seven months of its fiscal year, compared with a deficit of nearly $6.6 billion in the same period last year, as revenue has increased faster than spending.

According to the monthly fiscal monitor report from the Department of Finance, revenue totalled nearly $186.1 billion between April and October, up about 8.3 per cent from $171.8 billion in the same period last year.

The increase came due to rises in tax revenue, employment-insurance premiums and other revenues.

Program spending has topped $171.8 billion, up about 3.7 per cent from $165.8 billion over the same stretch last year, while public debt charges so far this fiscal year totalled more than $14.1 billion, up 12.1 per cent from almost $12.6 billion.

For the month of October, which is as far as the latest report goes, the federal government posted a deficit of $1.1 billion, compared with a deficit of about $400 million in the same month last year.