A town just outside Watford has been revealed to have the best school attainment in an ONS study.

The analysis, which looks at the educational attainment of pupils who sat their GCSEs in the 2012 to 2013 school year, revealed Northwood to have the highest average attainment of any town or city in England.

It also revealed that, overall, small towns have higher average educational attainment that larger towns and cities and suggested this was partly because a larger share of these towns have low levels of income deprivation.

The data was based on where the young person lived when they sat their GCSEs.

A score of 0 was the average score of all areas, while negative scores reflected poorer than average performance and positive scores reflected better than average attainment.

Northwood, classed as a small town, scored 11.9 while Harpenden was second with 11, but was the highest scoring medium sized town.

Watford was given the above average score of 2.8, while Chorleywood students were among the country's best performers with a 9.4.

Rickmansworth (including Croxley Green) scored 5.6, Bushey scored 5.9, and Radlett scored 7.9.

Slightly further away, Amersham scored 8.1, Chalfont St Giles scored 8.5, Berkhamsted scored 6.1, How Wood scored 6.7, Borehamwood scored -0.1, and Hemel Hempstead (which included Kings Langley) scored -0.9.

St Albans was third highest scoring large town at 5.8 and Gerrards Cross was the third highest scoring medium sized town with a 10.

The ONS used a score that summarises the educational attainment of young people at different points throughout their education to compare towns.

The analysis, which uses Longitudinal Education Outcomes (LEO) data collected by the Department for Education (DfE), concluded that small towns had an average score of 0.4 and large towns had an average score of -0.9.

Among the top 10% of towns in England with the highest educational attainment scores, none had high levels of income deprivation, the ONS said.

Association of School and College Leaders general secretary Geoff Barton said: “This analysis demonstrates how closely aligned educational outcomes are to levels of deprivation.

“Raising attainment is therefore dependent not only on ensuring that schools in areas of high deprivation are well supported and resourced, but also on wider efforts to tackle poverty and improve local economies.”