To develop an automated computable phenotype (CP) algorithm for identifying diabetes cases in children and adolescents usingelectronic health records (EHRs) from the UF Health System. The CP algorithm was iteratively derived based on structured data from EHRs (UF Health System 2012-2020). We randomly selected 536 presumed cases among individuals aged <18 years who had (1) glycated haemoglobin levels ≥ 6.5%; or (2) fasting glucose levels ≥126 mg/dL; or (3) random plasma glucose levels ≥200 mg/dL; or (4) a diabetes-related diagnosis code from an inpatient or outpatient encounter; or (5) prescribed, administered, or dispensed diabetes-related medication. Four reviewers independently reviewed the patient charts to determine diabetes status and type. Presumed cases without type 1 (T1D) or type 2 diabetes (T2D) diagnosis codes were categorized as non-diabetes/other types of diabetes. The rest were categorized as T1D if the most recent diagnosis was T1D, or otherwise categorized as T2D if the most recent diagnosis was T2D. Next, we applied a list of diagnoses and procedures that can determine diabetes type (e.g., steroid use suggests induced diabetes) to correct misclassifications from Step 1. Among the 536 reviewed cases, 159 and 64 had T1D and T2D, respectively. The sensitivity, specificity, and positive predictive values of the CP algorithm were 94%, 98% and 96%, respectively, for T1D and 95%, 95% and 73% for T2D. We developed a highly accurate EHR-based CP for diabetes in youth based on EHR data from UF Health. Consistent with prior studies, T2D was more difficult to identify using these methods.