Schools in England facing the greatest financial difficulty should be prioritised in government spending pledges, the think tank Reform says.
Its research finds that while over a quarter of local authority funded-secondaries were in the red in 2018/19, over a third had "excessive surplus".
Reform says this variation in finances shows a need for "targeted funding".
Ministers have announced plans to increase state school spending in England by £7.1 billion by 2022/23.
Reform, a think tank for public service reform, says the accounts for these council-run schools "show a complex picture".
It finds that 28.3% of secondary and 7.8% of primary schools were in deficit in the last academic year, with average shortfalls of £570,000 in secondaries and £56,000 in primaries.
But its analysis also finds 70% of secondaries and 90% of primaries reported a surplus - of these, 36% of secondaries and 42% of primaries had "excessive surpluses".
"This highlights the increasing gap between the average surpluses and deficits across maintained schools in England," it says.
Reform's analysis found no correlation between revenues and secondary school pupils' attainment outcomes.
It also found that there were no clear drivers of poor revenues - a school's characteristics, such as the percentage of children on free school meals or the number of support staff, did not necessarily correlate with a school's finances.
The report says: "The challenge for the new government, then, is to establish which factors most impact a school's revenue balances, and whether the decisions made in schools with excessive revenues can be replicated across England."
Around one in four secondary schools are maintained - i.e. run by their local council - and the rest are other types of state secondary, largely academies, and are not included in the research.
'Right this wrong'
Reform is calling on the government to target the extra cash it has announced for schools to those "in most financial need".
The report concludes: "The variation in school finances demonstrates a need for targeted funding, and further exploration of why certain schools are more susceptible to financial difficulties.
"For the new government, the focus of spending pledges should be on righting this wrong.
"While all schools will welcome an increase in their budgets, the 2018/19 accounts demonstrate a need to prioritise those in the most financial difficulty."
The government has said that next academic year (2020/21) secondary schools will receive a minimum of £5,000 per pupil, and in 2021/22 primaries will get a minimum of £4,000 per pupil.
Report author Dr Luke Heselwood said: "Extra cash for schools is welcome, but it must be well spent.
"A universal 'levelling-up' approach risks wasting taxpayers' money, while failing to sufficiently help those schools in financial hardship."
But a spokeswoman for the Department for Education said: "With the introduction of the national funding formula, schools are funded according to need, based on the characteristics of the pupils they serve.
"We do not intend, instead, to direct funding to schools based on their historic spending decisions. That would be a retrograde and unfair approach."
The move to boost funding, announced by Prime Minister Boris Johnson in August, came after years of lobbying by heads and teachers for more cash.
Geoff Barton, general secretary of the Association of School and College Leaders, said the financial situation for schools would "continue to be challenging for the foreseeable future".
"We are continuing to campaign for an improved level of funding on behalf of schools, parents and pupils," he added.
In July last year. the Institute for Fiscal Studies found the amount of per pupil spending in England's schools had fallen by 8% since 2010.