Expected Goals (xG) Calculator
A free, interactive soccer xG simulator. Place attackers, defenders, and a goalkeeper on a half-pitch, choose a shooter, and compare the expected goals value returned by several peer-reviewed academic models — all side by side, in real time.
- Multiple models: compare Rathke, Anzer & Bauer, the Kos Angle model, CNN-based xG and more on the same shot.
- Full context: toggle defenders, goalkeeper position, shot technique, body part, first-time shots and defensive pressure.
- Learn by doing: see how each variable moves xG and build an intuition for shot quality.
- Import real shots: paste a JSON shot or pull from the sample database and tweak it on the pitch.
What is xG?
Expected goals (xG) is a statistical metric used across professional football analytics to estimate the probability that a given shot will become a goal. Instead of treating every shot the same, xG assigns each attempt a value between 0 and 1 based on factors such as distance to goal, angle, defensive pressure, the body part used, and whether the shot was taken first time. A tap-in from two yards might be worth 0.85 xG, while a speculative strike from 30 yards might be worth just 0.02 xG.
Clubs, broadcasters and bettors use xG to separate process from outcome: a team creating 2.3 xG per match is generating good chances, even on nights the ball refuses to go in. Want a deeper dive? Read our full guide to expected goals, or see how different xG models disagree and why this calculator shows several at once.
Try the simulator
Pick a tool above the pitch and click to place attackers, defenders and the goalkeeper; click an attacker again to make them the shooter. Shortcuts: left click for attackers, right click for defenders, G for the goalkeeper and S to select the shooter nearest your cursor. Full controls are on the How to Use page.
Keep reading
- What is expected goals (xG)? A complete beginner's guide— the history, intuition and maths behind the metric.
- How xG models differ, and why their numbers rarely match— a tour of the academic models used in this calculator.
- The Rathke model: zone-based xG explained— the simplest xG model still in active use, with the eight-zone table re-fit on 23,098 Statsbomb shots.
- The Kos Angle explained: how Karim & Marwane measure the space a shooter really has— the shot angle minus every body in the way, and what it changed when the models were re-trained.
- xG from pixels: how Matteotti & Sotudeh turn a shot into an image— a 30×40 image, a convolutional network, and the goal-line experiment that shows its limits.
- Building a hybrid xG model: features from Anzer & Bauer, Hewitt & Karakuş and Narayanan & Pifer— sixteen features from three papers, why gradient boosting won, and why it agrees most with Statsbomb.
- Where xG models disagree: the Messi miss, the Sergiño Dest goal and the goal-line shot— three shots where the four models part ways, and how to read the results table when they do.
- xG glossary: every term you'll see in football analytics— xA, xT, PSxG, shot maps and more, explained in plain English.
- About the project and the models behind it