Ottawa ran a deficit of nearly $1.88 billion in August compared with a deficit of nearly $2.63 billion in the same month last year as revenue increased faster than spending.
According to the monthly fiscal monitor report from the Department of Finance, revenue totalled nearly $25.13 billion in August, up from $22.76 billion in the same month last year.
The increase came due to a rise in tax revenue, employment insurance premium revenue and other revenues.
Program spending totalled $24.98 billion, up from nearly $23.57 billion, while public debt charges for the month totalled $2.02 billion, up from $1.82 billion.
For the April-to-August period, the federal government posted a surplus of $2.56 billion, compared with a deficit of nearly $2.91 billion reported in the same period of 2017-18.
The government's February budget predicted a deficit of $18.1 billion for the current 2018-19 fiscal year.