Key PointsQuestionCan risk for posttraumatic stress disorder (PTSD) be accurately predicted prior to military deployment?FindingsThis diagnostic/prognostic study of 4711 US Army soldiers developed machine learning models to predict postdeployment PTSD using self-reported predictors collected before deployment. An optimal model was selected based on performance in 2 cohorts and then validated in a temporally and geographically distinct cohort, where approximately one-third of participants with the highest predicted risk accounted for an estimated 62.4% of the PTSD cases.MeaningThese findings suggest that PTSD risk may be accurately stratified prior to military deployment, which may facilitate the development of targeted intervention strategies.