NSW has moved from deficit to surplus due to "totally unacceptable" errors in its accounts, the Auditor-General says.

The government had allowed the budget deficit to bounce around "like a pinball machine", said Peter Achterstraat as he announced a budget result that was $1 billion better than predicted in the 2012-13 budget papers published in June 2012.

Errors are "totally unacceptable" ... Peter Achterstraat. Credit:Bob Pearce

Total revenues were close to $600 million higher and total expenses were over $400 million lower than forecast.

An expected deficit of $337 million in the middle of June became a surplus of $680 million by the end of June.