Background: Atrial fibrillation (AF) is associated with increased risks of stroke and heart failure. Electronic health record (EHR)-based AF risk prediction may facilitate efficient deployment of interventions to diagnose or prevent AF altogether. Methods: We externally validated an electronic health record AF (EHR-AF) score in IBM Explorys Life Sciences, a multi-institutional dataset containing statistically deidentified EHR data for over 21 million individuals (Explorys Dataset). We included individuals with complete AF risk data, ≥2 office visits within 2 years, and no prevalent AF. We compared EHR-AF to existing scores including CHARGE-AF (Cohorts for Heart and Aging Research in Genomic Epidemiology Atrial Fibrillation), C2HEST (coronary artery disease or chronic obstructive pulmonary disease, hypertension, elderly, systolic heart failure, thyroid disease), and CHA2DS2-VASc. We assessed association between AF risk scores and 5-year incident AF, stroke, and heart failure using Cox proportional hazards modeling, 5-year AF discrimination using C indices, and calibration of predicted AF risk to observed AF incidence. Results: Of 21 825 853 individuals in the Explorys Dataset, 4 508 180 comprised the analysis (age 62.5, 56.3% female). AF risk scores were strongly associated with 5-year incident AF (hazard ratio per SD increase 1.85 using CHA2DS2-VASc to 2.88 using EHR-AF), stroke (1.61 using C2HEST to 1.92 using CHARGE-AF), and heart failure (1.91 using CHA2DS2-VASc to 2.58 using EHR-AF). EHR-AF (C index, 0.808 [95% CI, 0.807-0.809]) demonstrated favorable AF discrimination compared to CHARGE-AF (0.806 [95% CI, 0.805-0.807]), C2HEST (0.683 [95% CI, 0.682-0.684]), and CHA2DS2-VASc (0.720 [95% CI, 0.719-0.722]). Of the scores, EHR-AF demonstrated the best calibration to incident AF (calibration slope, 1.002 [95% CI, 0.997-1.007]). In subgroup analyses, AF discrimination using EHR-AF was lower in individuals with stroke (C index, 0.696 [95% CI, 0.692-0.700]) and heart failure (0.621 [95% CI, 0.617-0.625]). Conclusions: EHR-AF demonstrates predictive accuracy for incident AF using readily ascertained EHR data. AF risk is associated with incident stroke and heart failure. Use of such risk scores may facilitate decision support and population health management efforts focused on minimizing AF-related morbidity.