AI / MLPersonal projectJun 2026
World Cup 2026 Predictor
An Elo and Random Forest model that simulated the 48-team tournament tens of thousands of times and called Spain as champion before kickoff.
- matches rated
- 15,790
- matches rated
- tournament simulations
- 50,000+
- tournament simulations
- semifinalists called
- 4 of 4
- semifinalists called
The bet
I wanted a forecast I could publish before the 2026 World Cup started and then be held to. The model went up on GitHub before the first match.
It picked Spain as champion, and its top four matched the four teams that actually reached the semifinals.
Rating every team
I built an Elo rating system over 15,790 international matches from 2010 to 2026. Every team starts at 1500, and matches move ratings by how much they mattered: World Cup and continental finals swing hardest, friendlies least. Beating a stronger team moves you further.
A Random Forest then predicts win, draw or loss from the Elo gap, the FIFA ranking gap, both teams' ratings and whether the venue is neutral.
Simulating the tournament
Each simulated run plays the whole 48-team format: group tables with goal-difference tie-breaks, the best eight third-placed teams going through, a round of 32, and neutral-venue knockouts. Host nations get home advantage, and scorelines are drawn from historical goal patterns.
Running the full tournament more than 50,000 times turns single-match probabilities into each team's chance of reaching every round.