Objective: To evaluate body mass index (BMI) acceleration patterns in children and to develop a prediction model targeted to identify children at high risk for obesity before the critical time window in which the largest increase in BMI percentile occurs. Study design: We analyzed electronic health records of children from Israel's largest healthcare provider from 2002 to 2018. Data included demographics, anthropometric measurements, medications, diagnoses, and laboratory tests of children and their families. Obesity was defined as BMI ≥95th percentile for age and sex. To identify the time window in which the largest annual increases in BMI z score occurs during early childhood, we first analyzed childhood BMI acceleration patterns among 417 915 adolescents. Next, we devised a model targeted to identify children at high risk before this time window, predicting obesity at 5-6 years of age based on data from the first 2 years of life of 132 262 children. Results: Retrospective BMI analysis revealed that among adolescents with obesity, the greatest acceleration in BMI z score occurred between 2 and 4 years of age. Our model, validated temporally and geographically, accurately predicted obesity at 5-6 years old (area under the receiver operating characteristic curve of 0.803). Discrimination results on subpopulations demonstrated its robustness across the pediatric population. The model's most influential predictors included anthropometric measurements of the child and family. Other impactful predictors included ancestry and pregnancy glucose. Conclusions: Rapid rise in the prevalence of childhood obesity warrant the development of better prevention strategies. Our model may allow an accurate identification of children at high risk of obesity.