NSW is in great shape, Treasurer Gladys Berejiklian has declared, and the state's commuters and students are set to reap the benefits.

A massive $73.3 billion was set aside for state infrastructure over the next four years in Ms Berejiklian’s second state budget.

More than $10 billion of the funding will go towards public transport projects in 2016/17, including $1 billion for new suburban trains.

The treasurer also promised record spending in education, with at least $1 billion for 1100 extra classrooms in the next four years to deal with skyrocketing student enrolments.

The NSW government is looking forward to a $3.7 billion surplus next financial year, thanks to a white hot Sydney property market and the $10 billion sale of its electricity network, TransGrid.

But the sting is expected to come for Australia’s most populous state as it faces historically low GST revenue proceeds from the federal government in coming years.

NSW was the victim of its own success, Ms Berejiklian said, citing an estimated $10 billion in lost revenue by 2019/20 due to lower Commonwealth payments.

But the government was ready for the challenge as it banks and allocates the multi-billion dollar proceeds from its electricity assets privatisation program, she said.

New stamp duty taxes and land tax surcharges on foreign investors hoping to buy residential real estate are also expected to help boost the state’s coffers in coming years.