Universities in England have been warned they need to improve their treatment of students, after new data revealed stark gaps in achievement for black students and higher drop-out rates for students with mental health difficulties or from disadvantaged backgrounds.

The figures released by the Office for Students, the higher education regulator for England, marks a shift towards a new focus on how students from different backgrounds cope with university life, what class of degree they emerge with and what they go on to do after graduating.

The five years of data collected by the OfS shows huge variations in how universities in England admit, retain and award degrees to their students based on their sex, economic background and ethnicity, with the figures showing especially wide gaps in attainment for black students compared with other ethnicities.

While overall white students were much more likely to be awarded first class or upper second class degrees than black students, the OfS’s data showed that at nearly half of universities in England the gap between the two groups soared to 20 percentage points or more.

Among the worst offenders were Canterbury Christ Church University, where the attainment gap was 41 percentage points, followed by the University of Gloucestershire, Sheffield Hallam University and the University of the West of England, with gaps of 30 points or more.

Chris Millward, the OfS’s director for fair access and participation, said the gaps in minority ethnic attainment was very clear across the data and that institutions would be expected to make a “step change” over the next five years in how they deal with that and similar issues.

“Universities now need to focus their attention on the specific areas where they face the biggest challenges,” Millward said.

“While some universities will need to focus on improving access to higher education for students from disadvantaged backgrounds, the data shows that for many universities the real challenge is in ensuring these students can succeed in their studies, and thrive in life after graduation. This data will help them to do that, and to showcase their achievements.”

Some universities have already taken positive steps to tackle the issue, with Kingston University in London winning plaudits from the OfS for its approach.

Nona McDuff, Kingston University’s director of student achievement, said the attainment gap was a complex issue, but in many cases a major cause was the barriers placed in the way of some students.

“It has got to be an institutional approach, led by the university’s board and led by the vice-chancellor,” McDuff said. She advised universities to look at their own practices before assuming that underachievement was the fault of individual students.

While the figures showed that nationally there has been some improvement in admitting students from disadvantaged backgrounds, some elite universities still recruit few from the areas of highest deprivation.

The data showed that Imperial College in London had a 54-point gap between students recruited from areas with the highest educational attainment compared with those from the lowest. Oxford, Cambridge and Bristol universities were the others with gaps wider than 50 points.

The data also shows for the first time how students with mental health difficulties struggle both during and after their time on campus. The OfS data found that students with declared mental health conditions were more likely to drop out and less likely to go on to graduate-level jobs or further study if they did graduate.

“The data shows there are clear differences in outcomes for students who declare a mental health condition, compared to those students who have no known disability,” said Yvonne Hawkins, the OfS’s director of teaching excellence and student experience.

“Universities should look at the data closely and consider how they can continue to support students reporting mental ill-health. Work to improve the mental health of all students is a priority for the OfS.”