Using electronic health records, we derived and internally validated a prediction model to estimate risk factors for long COVID and predict individual risk of developing long COVID.#Population-based, retrospective cohort study.#Scotland.#Adults (≥18 years) with a positive COVID-19 test, ...