What this calculator is, and is not
This is a teaching model. It estimates the chance of scoring from one thing only: where on the pitch the shot was taken. The coefficients come from a published, reproducible fit in the Soccermatics course material, so you can check every step by hand.
It is not the model of Opta, StatsBomb or any other provider, and its numbers will differ from theirs. It has never seen the defenders, the goalkeeper, the height of the ball or the foot it was struck with. Use it to understand how expected goals works and to compare shooting positions, not to settle an argument about one particular chance.
The two measurements
Every shot location is described by two distances:
- x: how far the ball is from the goal line, measured straight out;
- c: how far it is to the side of the centre of the goal.
From those the calculator derives the two quantities that matter. The distance to the centre of the goal is the diagonal, √(x² + c²). The goal angle is the angle between the lines from the ball to the two posts, which is how wide the goal looks to the shooter:
The goal is 7.32 m wide, so each post is 3.66 m from the centre. When the result is negative (very close to the goal line, between the posts) add π: the angle is then wider than 90°.
The model
The fit is a logistic regression: a weighted sum of the measurements, squashed into a probability between 0 and 1.
θ is in radians and d, x and c are in metres. The coefficients are printed to four decimals in the source and used here unchanged. The data were 8,451 shots from the 2017/18 Premier League season in the public Wyscout event set, with penalties and direct free kicks left out.
The same source also fits two one-variable models, shown beside the main result:
When all three agree you can be fairly confident about the shot. When they disagree, usually for shots from wide positions, you are looking at a location where distance and angle tell different stories.
Worked example
The default shot is taken 11 m from the goal line and 6 m to the side of the centre: level with the penalty spot, off to one side.
- Distance: √(11² + 6²) = √157 = 12.53 m
- Goal angle: arctan(7.32 × 11 ÷ (121 + 36 − 13.40)) = arctan(0.5607) = 0.5110 rad = 29.3°
- z = 0.5103 + 0.3239 − 3.5059 + 1.3673 − 0.1800 + 0.1694 + 0.1476 − 0.7032 = −1.8706
- xG = 1 ÷ (1 + e^1.8706) = 0.13
So about 13 shots in 100 from there are scored, or one goal from every 7.5 attempts. The angle-only model says 0.11 and the distance-only model 0.15. Five shots of this quality add up to 0.67 xG and give a 51% chance of at least one goal.
xG from common positions
| Position | From goal line | From centre | Goal angle | xG |
|---|---|---|---|---|
| Centre of the six-yard line | 5.5 m | 0 m | 67.3° | 0.41 |
| Penalty spot, open play | 11 m | 0 m | 36.8° | 0.18 |
| Corner of the six-yard box | 5.5 m | 9.16 m | 21.8° | 0.15 |
| Edge of the box, central | 16.5 m | 0 m | 25.0° | 0.09 |
| Corner of the penalty area | 16.5 m | 20.16 m | 10.3° | 0.03 |
| 25 m out, central | 25 m | 0 m | 16.7° | 0.04 |
| 30 m out, central | 30 m | 0 m | 13.9° | 0.03 |
Two things stand out. Moving from the edge of the box to the penalty spot doubles the value of a shot. And a penalty, scored about 73% of the time in shoot-outs, is worth four open-play shots from the same spot.
Adding shots up
xG values add. Ten shots of 0.10 are worth 1.0 expected goals, the same as two shots of 0.50. They are not the same in every respect, though: the chance of scoring at least once is 65% for the ten small chances and 75% for the two big ones. The calculator shows both numbers for any count of identical shots.
To turn a team’s total xG into win, draw and loss probabilities, enter the two totals in the match win probability calculator.
Limits
- Location only. A free header from six metres and a volley under pressure from six metres get the same value. Averages hide a wide spread.
- One league, one season. 8,451 shots is enough for a stable curve inside the penalty area and thin beyond 30 m. The calculator stops at 40 m, past which the fitted curve has almost no shots behind it.
- Headers and feet together. The data mix both. Headers are typically scored less often than shots with the foot from the same spot, so one average covers two different kinds of chance.
- Rounded coefficients. Four decimals is what the source prints. The effect on the result is in the third decimal place.
The shot map on this page plots the penalty area, goal area and penalty arc from the Law 1 dimensions. It is drawn to scale, so distances and angles on the diagram match the pitch.
Frequently asked questions
What is xG in football?
How is xG calculated?
What is the xG of a penalty?
What is a good xG for one shot?
Why is my xG different from the number on TV?
Does the angle or the distance matter more?
Can a team's total xG be higher than the goals it scored?
Sources
- Soccermatics documentation: Fitting the xG model (logistic regression on 8,451 Premier League shots, 2017/18)
- Pappalardo L et al. A public data set of spatio-temporal match events in soccer competitions. Scientific Data 6, 236 (2019): the Wyscout event data used for the fit
- IFAB Laws of the Game 2026/27, Law 1: goal 7.32 m wide, penalty mark 11 m, penalty area 16.5 m
- Apesteguia J, Palacios-Huerta I. Psychological Pressure in Competitive Environments. UPF Working Paper 1116 (American Economic Review 100(5), 2010): shoot-out scoring rate
Embed this calculator
Free for clubs, coaches, schools and blogs. Copy the code below; it stays up to date by itself.