The NSW budget surplus for last financial year has come in $1.2 billion higher than estimated, mainly due to lower than expected expenses but also higher than forecast revenue from taxes, dividends and fines.

Treasurer Dominic Perrottet on Tuesday tabled the final result for 2016-17 as a surplus of $5.7 billion, up from the $4.5 billion announced in the June budget.

The final report on the state's finances for 2016-17 says that the better result was due to expenses falling by $985 million and revenue increasing by $131 million.

Transactions from "discontinuing operations" contributed a further $136 million.