The federal government posted a surplus of $6.3 billion for the first four months of its 2022-23 fiscal year.
The Finance Department says the result for the April-to-July period compared with deficit of $47.3 billion in the same stretch a year earlier.
In its monthly fiscal monitor, the government says revenue for the fiscal year so far totalled $143.1 billion, up from $118.5 billion a year ago.
Program expenses, excluding net actuarial losses, were nearly $122.2 billion for the fiscal year so far down from $152.9 billion during the same period a year earlier.
Public debt charges rose to $11.2 billion for the period, up from $7.8 billion.
Net actuarial losses totalled $3.4 billion for the period, down from $5.1 billion a year earlier.