We analysed data obtained from the electronic patient records of inpatients with diabetes admitted to a large university hospital to understand the prevalence and distribution of inpatient hypoglycaemia.The study was conducted using electronic patient record data from Oxford University Hospitals NHS Foundation Trust. The dataset contains hospital admission data for patients coded for diabetes. We used the recently agreed definition for a level 1 hypoglycaemia episode as any blood glucose measurement <4 mmol/l and a level 2 hypoglycaemia episode as any blood glucose measurement <3 mmol/l. Any two or more consecutive low blood glucose measurements within a 2 h time window were considered as one single hypoglycaemic episode.We analysed data obtained from 17,658 inpatients with diabetes (1696 with type 1 diabetes, 14,006 with type 2 diabetes, and 1956 with other forms of diabetes; 9277 men; mean ± SD age, 66 ± 18 years) who underwent 32,758 hospital admissions between July 2014 and August 2018. The incidence of level 1 hypoglycaemia was 21.5% and the incidence of level 2 hypoglycaemia was 9.6%. Recurrent level 1 and level 2 hypoglycaemia occurred, respectively, in 51% and 39% of hospital admissions in people with type 2 diabetes with at least one hypoglycaemic episode, and in 55% and 45% in those with type 1 diabetes. The incidence of level 2 hypoglycaemia in people with type 2 diabetes, when corrected for the number of people who remained in hospital, remained constant for the first 100 h at approximately 0.15 events per h per admission. With regards to the hypoglycaemia distribution during the day, after correcting for the number of blood glucose tests per h, there were two clear spikes in the rate of hypoglycaemia approximately 3 h after lunch and after dinner. The highest rate of hypoglycaemia per glucose test was seen between 01:00 hours and 05:00 hours. Medication had a significant impact on the incidence of level 2 hypoglycaemia, ranging from 1.5% in people with type 2 diabetes on metformin alone to 33% in people treated with a combination of rapid-acting insulin analogue, long-acting insulin analogue and i.v.-administered insulin.Retrospective analysis of data from electronic patient records enables clinicians to gain a greater understanding of the incidence and distribution of inpatient hypoglycaemia. This information should be used to drive evidence-based improvements in the glycaemic control of inpatients through targeted medication adjustment for specific populations at high risk of hypoglycaemia.