Australia is heading towards back-to-back surpluses for the first time in almost two decades.
The underlying cash balance for the financial year to the end of May was $18.2 billion, above the $9.3 billion forecast in the federal budget for the 2023/24 financial year.
Treasurer Jim Chalmers has warned the "high figure" published on Friday was not necessarily where the financial year would finish.
"Some softness in our tax take, when compared to payments, might still result in a surplus that's a bit smaller or a bit bigger than we forecast in the budget," he said in speech to the Citi A50 Australian Economic Forum in Sydney.
A second surplus would bode well for a government under pressure to prove it is helping fight inflation.
The federal opposition has been on the attack since hotter-than-expected inflation numbers on Wednesday, accusing the government of spending too much at a time when the Reserve Bank of Australia is trying to slow the economy to cool prices.
Dr Chalmers says surpluses, which are when tax revenue outstrips government spending, help combat price pressures in the economy.
Responding to the official Department of Finance monthly figures released on Friday, AMP Australia chief economist Shane Oliver said the revenue lift through to May 2024 was running below that posted this time last year.
"But it suggests the 2023/24 surplus could still be around $20 billion, well up on budget estimate of $9.3 billion," he said.
A record $22 billion surplus was posted in the year before thanks to a strong jobs market and higher commodity prices.
Yet after this financial year just ending, Dr Oliver said the budget is expected to sink back into the red as government spending picks up and revenue windfalls shrink.
The economist said the ongoing stickiness in the consumer price index highlighted the role of state and federal budgets in tackling inflation.
"While average households have cut back their spending as the RBA wants to happen, public spending across federal and state governments has gone up," Dr Oliver said.
This is "adding to demand in the economy and competing for workers and ultimately keeping inflation and hence interest rates higher than otherwise would have been the case," he said.
Distributional changes to the stage three tax cuts, due to kick in on Monday, increased risk that the relief package would be inflationary, he said.