Background: There is no published algorithm predicting asthma crisis events (Accident and Emergency (A&E) attendance, hospitalisation or death) using routinely available electronic health record (EHR) data. Aim: To develop an algorithm to identify individuals at high risk of an asthma crisis event. Design and Setting: Database analysis from primary care EHRs. Method: Multivariable logistic regression was applied to a dataset of 61,861 people with asthma from England and Scotland using the Clinical Practice Research Datalink. External validation was performed using the Secure Anonymised Information Linkage databank of 174,240 patients from Wales. Outcomes were one or more hospitalisation (development dataset) and asthma-related hospitalisation, A&E attendance or death (validation dataset) within a 12-month period. Results: Risk factors for asthma-related crisis events included previous hospitalisation, older age, underweight, smoking and blood eosinophilia. The prediction algorithm had acceptable predictive ability with a Receiver Operating Characteristic (ROC) of 0.71 (0.70, 0.72) in the validation dataset. Using a cut-point based on the 7% of the population at greatest risk results in a positive predictive value of 5.7% (95% CI 5.3 – 6.1) and a negative predictive value of 98.9% (98.9 – 99.0), with sensitivity of 28.5% (26.7 – 30.3) and specificity of 93.3% (93.2 – 93.4); they had an event risk of 6.0% compared 1.1% for the remaining population. Eighteen people would be “needed to follow” to identify one admission. Conclusions: This externally validated algorithm has acceptable predictive ability for identifying patients at high risk of asthma-related crisis events and excluding individuals not at high risk.