Background Frailty is a widespread geriatric syndrome among older adults, including hospitalized older inpatients. Some countries use electronic frailty measurement tools to identify frailty at the primary care level, but this method has rarely been investigated during hospitalization in acute care hospitals. An electronic frailty measurement instrument based on population-based hospital electronic health records could effectively detect frailty, frailty-related problems, and complications as well be a clinical alert. Identifying frailty among older adults using existing patient health data would greatly aid the management and support of frailty identification and could provide a valuable public health instrument without additional costs. Objective We aim to explore a data-driven frailty measurement instrument for older adult inpatients using data routinely collected at hospital admission and discharge. Methods A retrospective electronic patient register study included inpatients aged ≥65 years admitted to and discharged from a public hospital between 2015 and 2017. A dataset of 53,690 hospitalizations was used to customize this data-driven frailty measurement instrument inspired by the Edmonton Frailty Scale developed by Rolfson et al. A 2-step hierarchical cluster procedure was applied to compute e-Frail-CH (Switzerland) scores at hospital admission and discharge. Prevalence, central tendency, comparative, and validation statistics were computed. Results Mean patient age at admission was 78.4 (SD 7.9) years, with more women admitted (28,018/53,690, 52.18%) than men (25,672/53,690, 47.81%). Our 2-step hierarchical clustering approach computed 46,743 inputs of hospital admissions and 47,361 for discharges. Clustering solutions scored from 0.5 to 0.8 on a scale from 0 to 1. Patients considered frail comprised 42.02% (n=19,643) of admissions and 48.23% (n=22,845) of discharges. Within e-Frail-CH’s 0-12 range, a score ≥6 indicated frailty. We found a statistically significant mean e-Frail-CH score change between hospital admission (5.3, SD 2.6) and discharge (5.75, SD 2.7; P<.001). Sensitivity and specificity cut point values were 0.82 and 0.88, respectively. The area under the receiver operating characteristic curve was 0.85. Comparing the e-Frail-CH instrument to the existing Functional Independence Measure (FIM) instrument, FIM scores indicating severe dependence equated to e-Frail-CH scores of ≥9, with a sensitivity and specificity of 0.97 and 0.88, respectively. The area under the receiver operating characteristic curve was 0.92. There was a strong negative association between e-Frail-CH scores at hospital discharge and FIM scores (rs=–0.844; P<.001). Conclusions An electronic frailty measurement instrument was constructed and validated using patient data routinely collected during hospitalization, especially at admission and discharge. The mean e-Frail-CH score was higher at discharge than at admission. The routine calculation of e-Frail-CH scores during hospitalization could provide very useful clinical alerts on the health trajectories of older adults and help select interventions for preventing or mitigating frailty.