Biochemical recurrence (BCR) occurs in about 40% of patients with prostate cancer following radical prostatectomy (RP). Our goal was to develop a machine learning model for the prediction of BCR five-years after RP, to improve patient prognostication. Patients treated with RP at a tertiary care medical center between 1990 and 2017 were included. A gradient boosted decision trees-based machine learning model modified to handle survival data was trained on 80% of the dataset. The model's performance was evaluated on the remaining 20%. Input variables were age at surgery, prostate specific antigen (PSA) at diagnosis (in ng/mL), pathologic Gleason grade group (GG), pathologic T stage (organ confined disease vs. extracapsular extension (ECE) vs. seminal vesicle invasion (SVI)), lymph node involvement, and surgical margin status. Model performance was assessed using time-dependent area under curve of the receiver operator curve (AUC). The full dataset included 11,139 patients, of whom 1,153 (10%) developed BCR. Median age at surgery was 59 and PSA at diagnosis was 5.4 ng/mL. Only 1,080 (9.7%) patients had GG 3, and 707 (6.3%) GG 4 and 5. 1,366 (12%) patients had positive surgical margins and 134 (1.2%) had lymph node involvement. Most patients had organ confined disease with EPE and SVI diagnosed in 2,759 (25%) and 392 (3.5%) patients, respectively. Median follow-up was 5 years and median time to BCR was 4 years. When validated on the hold-out set of 2,228 patients, the model shows a time-dependent AUC of 0.82 (95% CI 0.78 - 0.86) for BCR at t = 5 years. Our machine learning model can be used to estimate risk of BCR following RP and shows exceptional performance, with implications on patient prognostication and follow-up. We are currently working on validating its performance on an external dataset.