xG Explained

What is xG?

Very simply, xG (or expected goals) is the probability that a shot will result in a goal based on the characteristics of that shot and the events leading up to it. Some of these characteristics/variables include:

Every shot is compared to thousands of shots with similar characteristics to determine the probability that this shot will result in a goal. That probability is the expected goal total. An xG of 0 is a certain miss, while an xG of 1 is a certain goal. An xG of .5 would indicate that if identical shots were attempted 10 times, 5 would be expected to result in a goal.

There are a number of xG models that use similar techniques and variables, which attempt to reach the same conclusion. The model that FBref uses is provided by StatsBomb. What sets StatsBomb's xG model apart from others is their use of freeze frames. A freeze frame is the location of all players on the pitch at the moment the shot was taken. Was the goalkeeper in position? Was it an open goal or were there a number of defenders between the shooter and the goal? Was the shooter being pressured? Was it a 1v1 situation with the keeper?

Take this Callum Wilson goal vs Southampton for example. The shot was taken directly in front of the goal from six yards out. However, Wilson was the only player in the penalty area at the time of the shot, making it a completely open goal. According to StatsBomb's data, just 3% of shots from this location were taken with an open goal. Comparing this shot to all other shots taken from this spot without accounting for the location of the defense would return a wide range and inaccurate set of results. In fact, other expected goal models credit this exact shot anywhere from 0.5 to 0.66 xG. StatsBomb, and their use of freeze frames, credits this shot with .97 xg, making it an almost guaranteed goal.

xG does not take into account the quality of player(s) involved in a particular play. It is an estimate of how the average player or team would perform in a similar situation.

How xG is used

xG has many uses. Some examples are:

Penalty Kicks

Each penalty kick is worth .76 xG since all penalty kicks share the same characteristics. Comparing a player's goals from penalty kicks to their penalty kick xG can indicate a player's penalty kicking ability. Likewise, we can do the same for goalkeepers in these situations.

FBref's xG totals include penalty kicks unless otherwise noted. For xG excluding PK, we recommending using npxG (non-penalty expected goals).

How we calculate xG totals for a single offensive possession

In some cases, a player or team's xG totals do not equal the sum of their shots. For instance, a team may attempt multiple shots in a single possession, but it is likely that these shots are contingent upon the outcome of the previous shot(s).

Take for example, this match between Schalke 04 and Nürnberg:

In the 78th minute, Nürnberg attempted three shots which ultimately led to a goal. Hanno Behrens attempts a shot that is saved, but he is able to take a second shot as the ball is deflected off the defender. The second shot goes off the woodwork, which allows Adam Zreľák to easily tap it in. According to StatsBomb's expected goals model:

The sum of these three shots is 1.86 expected goals, even though it is impossible to score more than one goal in a single move. To solve this problem, we find the probability that the defending team does not allow a goal in this possession. In this case, the calculation is:

(1 - .37) x (1 - .68) x (1 - .81) = .0383 or a 3.83% probability that Schalke does not allow a goal.

To find Nürnberg's xG, we simply subtract that probability from 1:

1 - .0383 = .9617 xG

In other words, we estimate that an average team in a similar situation would be expected to score a goal 96.17% of the time.

We use a similar method when calculating xG for individual players. Adam Zreľák receives .81 xG from his single shot while Hanno Behrens receives:

1 - (1 - .37) x (1 - .68) = .7984 xG

This shows why a team or player's total xG may not equal the sum of the xG from their shots and why a team's total xG may not equal the sum of the xG from their players.

Possessions that include a penalty kick

Similarly, we include shots taken from a rebound after a penalty kick with xG from penalty kicks. Take this Alexis Sanchez penalty kick for example:

Since the second shot is a result of the first, we use the same probabilistic method in the previous example. Rather than a total 1.48 xG (.76 + .72), the calculation is:

1 - (1 - .76) * (1 - .72) = .9328 expected goals

However, since the second shot is also considered to be a part of the penalty kick xG, Sanchez gets 0 npxG (non-penalty expected goals) on this play.

Note: We treat corner kicks and free kicks as a new possession, not a continuation of the previous possession, but are continuing to study the issue.

Update: On July 31, 2020, StatsBomb upgraded their xG model with the inclusion of shot impact height, which is the height of the ball when a shot is struck. For many shots in which we know the height of the pass preceding the shot, there will be little to no impact. For the other shots, however, there is a "sizeable impact" on their xG value. This update improves the quality of an already industry-leading xG model.

What is Post-Shot xG (PSxG)?

Regular xG, or what can be considered "Pre-Shot xG", is calculated considering all shots at the time of the shot without knowing the quality of the shot attempt. It not only includes shots that are on target, but also shots that are deflected or off target. Post-Shot xG is calculated after the shot has been taken, once it is known that the shot is on-target, taking into account the quality of the shot. As with xG, PSxG is provided by StatsBomb and is further explained here.

All shots which are off target will have a PSxG of zero since there is a 0% chance that this trajectory will lead to a goal. For shots that are on target, their PSxG will almost always be higher than its xG value since it is a better than average shot compared to all shots with similar pre-shot characteristics.

When evaluating a goalkeeper's shot stopping ability, we only want to include shots that are on target since these are the shots where the goalkeeper can have an impact. Therefore, we use PSxG to estimate the quality of shots in which they have faced.

What is xA?

xA, or expected assists, is the xG which follows a pass that assists a shot. This indicates a player's ability to set up scoring chances without having to rely on the actual result of the shot or the shooter's luck/ability. Note: Because xA comes from passes, not all assists will be given an xA value.

Where to find xG

Team xG, xG against, and xG difference can be found on league tables, such as this:

Regular season Table
Rk Squad MP W D L GF GA GD Pts xG xGA xGD
1Manchester City3832249523+729884.625.1+59.5
6Manchester Utd38199106554+116658.846.2+12.6
9Leicester City38157165148+35249.545.4+4.1
10West Ham38157165255-35247.760.9-13.2
12Crystal Palace38147175153-24950.448.6+1.8
13Newcastle Utd38129174248-64538.852.8-14.0
18Cardiff City38104243469-353439.462.4-23.1

Player xG, npxG & xA can be found on team pages, such as this:

Standard Stats 2018-2019 Manchester City: Premier League Table
Playing Time Performance Per 90 Minutes Expected Per 90 Minutes
Player Nation Pos Age MP Starts Min 90s Gls Ast G-PK PK PKatt CrdY CrdR Gls Ast G+A G-PK G+A-PK xG npxG xA npxG+xA xG xA xG+xA npxG npxG+xA
Edersonbr BRAGK2438383,42038.001000200.
Aymeric Laportees ESPDF2435343,05734.033300300.
Bernardo Silvapt PORMF,FW2336312,85431.777700300.220.220.440.220.446.
Raheem Sterlingeng ENGFW2334312,77130.81791700300.550.290.840.550.8414.014.010.624.60.450.340.800.450.80
Sergio Agüeroar ARGFW3033312,45927.32181922400.770.291.060.700.9919.518.05.423.40.710.200.910.660.86
Kyle Walkereng ENGDF2833302,77930.911100300.
David Silvaes ESPMF3233282,40126.768600200.220.300.520.220.527.57.59.917.30.280.370.650.280.65
Fernandinhobr BRAMF3329272,37726.413100500.
İlkay Gündoğande GERMF2731232,13723.763600300.250.130.380.250.384.
Leroy Sanéde GERFW2231211,86720.710101000100.480.480.960.480.965.
John Stoneseng ENGDF2424201,76419.600000100.
Riyad Mahrezdz ALGFW,MF2727141,34314.974701000.470.270.740.470.745.
Nicolás Otamendiar ARGDF3018141,23613.700000100.
Oleksandr Zinchenkoua UKRDF2114141,15112.803000100.
Vincent Kompanybe BELDF3217131,22413.610100600.
Kevin De Bruynebe BELMF27191197510.822200200.180.180.370.180.372.
Benjamin Mendyfr FRADF24101090010.005000100.000.500.500.000.500.
Danilobr BRADF271198079.010100100.
Gabriel Jesusbr BRAFW212981,03611.573611100.610.260.870.520.7810.09.21.811.00.870.161.030.800.96
Fabian Delpheng ENGDF281187258.101000110.
Phil Fodeneng ENGMF181333353.710100000.
Philippe Sandlernl NEDDF2100
Arijanet Muricxk KVXGK1900
Claudio Bravocl CHIGK3500
Squad Total26.7384183,42038.0917188344412.391.874.262.324.1884.681.665.1146.72.231.713.942.153.86
Squad Total26.7384183,42038.0917188344412.391.874.262.324.1884.681.665.1146.72.231.713.942.153.86

Expected goals can also be found on a number of different pages such as league player stats, match reports, player pages and player match logs.

FBref Competitions with xG Data

Matches Currently Missing xG Data

  • Data will be added once it becomes available