NSW public schools are raking in millions of dollars from hiring out facilities, private donations and charging fees while others in disadvantaged areas are being left behind despite the commitment of both state and federal governments to needs-based funding.

A Fairfax Media analysis of MySchool data shows that schools such as Sydney Boys High and Northern Beaches Secondary College are pulling in more than 25 per cent of their income from private sources, boosting their bottom line by as much as $3.98 million in 2014, the last year that public data is available.

By contrast, a similarly sized school of more than 1000 students such as North Lakes High School in San Remo on the Central Coast was only able to raise $300,000 privately, while receiving $2.5 million more in total government funding, leaving it $1.5 million short every year.

The schools at the top of the list such as Mosman High, Normanhurst Boys and North Sydney Girls are overwhelmingly selective and in high socio-economic areas with strong alumni groups, but the government has refused to consider redistributing income gained from private sources into a pool of funds that could be redirected to those most in need.