Some of the best brains in Britain are residing in the St Albans district, according to a study commissioned by the Royal Mail.

The Harpenden postcode AL5 is home to some of the UK’s highest achieving students, coming in the top five for GCSE results and top 10 for A-levels.

The study was carried out by the Centre for Economic and Business Research to celebrate the invention of the postcode, which had its 40th birthday last year.

AL5 came fifth in the GCSE study after achieving an average point score of around 385, just beaten to the top spot by Gerrards Cross, Amersham, Solihull, and Beaconsfield.

The postcode also came seventh in the UK for A-Levels, beating off competition with a top average score of around 860.

Steve Rooney, head of Royal Mail’s address management unit, said: “Royal Mail’s study provides an insight into the academic heartbeat of the nation, as seen through the postcode, to mark the anniversary of the allocation of postcodes to every address in Britain.”

The study’s results are based on figures from 2008/9 to 2012/13.