Football (soccer)

Expected goals (xG) calculator

Place a shot by its distance from the goal line and from the centre of the goal to get its expected goals value from a published distance-and-angle model, with the goal angle and a shot map.

Metric and imperial Shareable link Printable report Free, no sign-up

Results

A shot from here is scored about 13.3% of the time: an average shot. On average it takes 7.5 shots like it to score once.
Expected goals (xG)0.1312.5 m from the centre of the goal, goal angle 29.3°
Chance of a goal
13.3%
Distance to the centre of the goal
12.5m
Angle between the posts
29.3°
Angle-only model
0.11
Distance-only model
0.15
xG from 5 shots like this
0.67
Chance of at least one goal from 5
51.1%
Shot map: penalty area from above, goal at the bottom (to scale)
  • Your shot: 11 m out, 6 m from the centre
  • Lines to the posts (29.3° between them)
  • Goal, 7.32 m between the posts
  • Penalty area, goal area, penalty mark and arc (Law 1)
  • Scale bar: 10 m

Drawn from the Law 1 dimensions with the same scale in both directions: one metre on screen is the same length across the pitch and out from the goal.

xG by distance for a central shot: three published fits

xG from reference spots

SpotFrom the goal line (m)From the centre (m)Goal anglexGShots per goal
Centre of the six-yard line5.5067.3°0.412.4
Penalty spot (open play)11036.8°0.185.5
Corner of the six-yard box5.59.221.8°0.156.5
Edge of the box, central16.5025°0.0911
Level with the penalty spot, 10 m wide111021.2°0.0910.7
Corner of the penalty area16.520.210.3°0.0335.5
25 m out, central25016.7°0.0426.2
30 m out, central30013.9°0.0339.6
Your shot11629.3°0.137.5

All values from the location model. They describe an average shot from the spot: foot or head, any amount of pressure.

  • Educational approximation. The model is a logistic regression on shot location only, fitted to 8,451 Premier League shots from 2017/18 (penalties and direct free kicks excluded) and published in the Soccermatics course. It is not the model of any data provider and it does not know about defenders, the goalkeeper, the body part or the type of pass.
  • The shot is inside the penalty area.
  • Coefficients are used as published, to four decimals. Beyond about 40 m the fit has almost no shots behind it, so the calculator stops there.

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:

θ = arctan( 7.32 × x ÷ (x² + c² − 3.66²) )

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.

z = 0.5103 + 0.6338 θ − 0.2798 d + 0.1243 x − 0.0300 c + 0.0014 x² + 0.0041 c² − 0.1251 θx xG = 1 ÷ (1 + e^(−z))

θ 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:

angle only: z = −3.5248 + 2.8436 θ distance only: z = 0.1555 − 0.1496 d

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?
Expected goals (xG) is the probability that a shot is scored, estimated from thousands of earlier shots of the same kind. A shot with 0.10 xG is scored about one time in ten. Add the xG of all of a team's shots and you get the number of goals an average team would score from those chances.
How is xG calculated?
A statistical model is fitted to a large set of past shots, each labelled goal or no goal. The simplest models use only where the shot was taken: the distance to goal and the angle between the posts. Commercial models add the body part, the type of pass, the position of defenders and goalkeeper, and more.
What is the xG of a penalty?
Data providers give every penalty one fixed value, a little under 0.8. Research on shoot-outs puts the scoring rate lower, at 73.1% of 2,731 kicks. A shot from the penalty spot in open play is a different thing: this model gives it 0.18, because a defender, a bouncing ball and a goalkeeper off his line are all in the way.
What is a good xG for one shot?
Above about 0.30 is a big chance and anything over 0.15 is a good one. In this model a central shot from the penalty spot is worth 0.18, one from the edge of the box 0.09 and one from 25 metres 0.04, so most shots from outside the area are worth a few hundredths of a goal.
Why is my xG different from the number on TV?
Because every provider has its own model and its own data. A model that knows the goalkeeper was out of position will rate a chance far higher than one that knows only the location. This calculator uses location alone, so treat it as a first approximation.
Does the angle or the distance matter more?
They carry much the same information for central shots, and the angle matters more out wide. Six metres from the goal line but ten metres to the side, a shooter sees a far narrower goal than from eleven metres straight in front, and the model rates it lower.
Can a team's total xG be higher than the goals it scored?
Yes, and over a few matches that is common. Finishing varies a lot from game to game. Over a season the two totals move closer together, which is why analysts read xG as a guide to how well a team has created chances.

Sources

  1. Soccermatics documentation: Fitting the xG model (logistic regression on 8,451 Premier League shots, 2017/18)
  2. 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
  3. IFAB Laws of the Game 2026/27, Law 1: goal 7.32 m wide, penalty mark 11 m, penalty area 16.5 m
  4. 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.