Expected Goals (xG) Difference Calculator

Expected Goals (xG) Difference Calculator

xG difference, xG per shot, and the gap between goals and expected goals in an association football match — from your own provider’s figures. This page does not model xG, because no provider’s model is published.

Arithmetic on your provider's xG figures

Your xG → the differences
Copy it from the match report or statistics site you are reading: xG is the output of a fitted model and cannot be worked out from the scoreline. Take every figure here from the SAME provider for the SAME match.
Actual goals scored. Whether a provider’s xG total includes penalties and own goals is its own convention — Opta assigns every penalty a fixed 0.79 xG rather than modelling it.
The same figure for the other team, from the same provider and match report.
Actual goals conceded.
Total shots, so xG per shot can be computed. Providers disagree about what counts as a shot — Davis and Robberechts found blocked shots in one provider’s stream and absent from another’s for the same match — so take it from the same source as the xG above.
1.11xG differenceExample

Your team 1.85 xG and 1 goal from 14 shots; the opponent 0.74 xG and 2 goals

Advertisement

What is computed here, and what is not

xG difference = your xG − the opponent’s xG
Performance against expectation = goals − xG
xG per shot = your xG ÷ your shots
there is no “the xG formula”
and that is the single most important thing on this page. Every provider fits its own model to its own data with its own features, and the fitted coefficients are commercial. Opta states that its model “uses a machine-learning technique called XGBoost” and “evaluates how over 20 variables affect the likelihood of a goal being scored” — the feature list is public and the model is not
why this page asks you for the number
because it is already printed in front of you, on the match report, the broadcast graphic or the statistics site. Honest arithmetic on a figure the reader supplies beats a guessed coefficient set, which would present an invention as the industry standard. The headline subtraction is signed, so reversing the teams reverses the sign, and it is zero only where the two figures are equal
goals minus xG
what happened, less what the model expected. Over a single match it is dominated by chance; over a season it is worth looking at and is still not a skill estimate, because it also absorbs every disagreement between your provider’s model and the world
xG per shot
a rate, and it refuses when shots are zero. It describes the average quality of the chances created rather than their number. Providers do not agree on what counts as a shot, so it is a within-provider figure only
what is deliberately absent
any conversion of xG into a price or an implied match probability. This page does not price anything, convert a bookmaker’s odds, or estimate a stake. It does arithmetic on figures a competition or a statistics provider publishes.

Worked example

Your team 1.85 xG and 1 goal from 14 shots; the opponent 0.74 xG and 2 goals
1.85 − 0.74 = 1.11 xG difference in your favour
Actual goal difference: 1 − 2 = −1. The model's reading of the match and the scoreline point opposite ways, which is what this arithmetic exists to make visible
Goals minus xG: 1 − 1.85 = −0.85 for you, 2 − 0.74 = +1.26 for the opponent
xG per shot: 1.85 ÷ 14 = 0.132, so the average chance was worth about an eighth of a goal
None of that says the losing side deserved to win. It says one provider's model valued your chances more highly, in one match; another provider's model would give different figures for the same shots
Set the shots to 0 and the xG-per-shot row disappears rather than printing a zero
Advertisement

What this page will compute with xG, and what it refuses to

CalculationDefensible?Why
xG difference: your xG minus the opponent’sYes, from one provider for one matchA subtraction of two figures the provider published together
Goals minus xGYes, same conditionBoth numbers are published for the match; their difference is a description rather than a skill measure
xG per shot from your own totalsYes, same conditionA rate on two published counts, which refuses when shots are zero
Computing the xG of a shotNo, and this page does notThere is no single xG model, and no provider publishes its fitted coefficients. A coefficient set written here would be an invention read as the industry figure
Comparing one provider’s xG with another’sNoThe same goal is valued 0.68 by one model and 0.90 by Opta’s, and two providers’ data disagree about which team was more dangerous in 13% of matches — see below
Turning xG into a price or an implied result probabilityNoOut of scope across this entire site
Taking the figure from the reader and doing honest arithmetic on it is not a compromise here; it is the only correct answer. xG is a model class rather than a statistic, the models are commercial, and the figure is printed on every match report anyway.

What the published descriptions say goes into an xG model

FeatureWho names it, and what they say about it
Distance to goal, and angle to goalOpta Analyst and FBref — in every description read for this page
Body part and shot typeOpta Analyst and FBref. Opta lists the foot used, the volley, the header and the one-on-one separately
Pattern of playOpta Analyst and FBref: open play, a fast break, a set piece
The previous action, such as the type of assistOpta Analyst
Goalkeeper positionOpta Analyst, which calls it “one unique and innovative feature” — itself evidence that it is not in every model
Clarity of the goal mouthOpta Analyst and FBref, computed from where the other players are
Pressure from defendersOpta Analyst and FBref
PenaltiesOpta Analyst — given a fixed 0.79 xG rather than modelled at all
Opta states that its model “evaluates how over 20 variables affect the likelihood of a goal being scored”, is “powered by nearly one million shots” from 40 competitions between 2018-19 and 2021-22, and uses XGBoost, with a separate model retrained for women’s competitions. The feature list is published; the fitted coefficients are not, by any provider read for this page. That gap — between knowing what a model looks at and being able to reproduce it — is why this page computes arithmetic around xG rather than xG.

There is no single xG formula, and this page does not pretend there is

Expected goals is a measurement built for association football — soccer. Other sports have their own expected-value models with their own data and their own names, and nothing on this page applies to them. Expected goals is the most useful number in football analytics and the most widely misunderstood, and the misunderstanding is structural: xG looks like a statistic and is actually the output of a fitted statistical model. A pass completion percentage is arithmetic anybody can repeat from the same raw counts. An xG figure is a prediction from a model trained on a provider’s own data, with its own feature set and its own coefficients, and two providers do not produce the same number for the same shot.

How different they are has been measured. Opta’s own description says its model uses XGBoost over more than twenty variables, trained on nearly a million shots from forty competitions between 2018-19 and 2021-22, with every penalty assigned a fixed 0.79 xG. FBref, which takes Opta’s model, illustrates the point against itself: the same goal is valued at 0.68 xG by an earlier model and 0.90 by Opta’s. Davis and Robberechts of the DTAI Sports Analytics Lab at KU Leuven ran one model on two providers’ event data for the 2018/19 top five leagues and found the two disagreed about which team had been the more dangerous in 238 of 1,826 matches, or 13% — and that the providers did not even agree on which events were shots, with blocked shots present in one stream and absent from the other.

So there is nothing for a calculator to implement. No provider read while this page was written publishes the fitted coefficients of its model, and any coefficient set written here would be an invention readers would reasonably take for the industry figure. What is left is honest and is what most people actually want: the xG figure is printed on every match report, broadcast graphic and statistics page, so this calculator takes it from you and does the arithmetic around it — xG difference, the gap between goals and xG for each side, and xG per shot.

Three cautions on the output. Take every figure from one provider for one match, because mixing sources mixes models. Do not read goals minus xG over one match as a finishing measure — over ninety minutes it is mostly chance, and over a season it still absorbs every disagreement between a model and the world. And do not convert any of it into a price: This page does not price anything, convert a bookmaker’s odds, or estimate a stake. It does arithmetic on figures a competition or a statistics provider publishes. For volume and rate rather than chance quality, the goals per 90 minutes calculator normalises raw counts by time played. Every other page in this category prints the governing body behind its figures. This one cannot, because no governing body publishes an expected-goals model: the numbers here come from whichever provider computed them, and each fits its own model on its own data and revises it. Check which provider your figure came from, and which version of their model, before comparing it with anybody else’s.

Frequently asked questions

What is the formula for expected goals?

There isn’t one. xG is a class of fitted model rather than a formula: each provider trains its own on its own data. Opta’s uses XGBoost over more than twenty variables and nearly a million shots, and its coefficients are not published. Any page that shows you “the xG formula” has invented a coefficient set.

Why does this calculator ask me for the xG instead of working it out?

Because the figure already exists on the match report in front of you, and because nothing else would be honest. Exact arithmetic on your provider’s number beats a guessed model, and it does not pass an invention off as a standard.

Can I compare xG from two different sources?

No. FBref, which uses Opta’s model, shows the same goal valued at 0.68 by an earlier model and 0.90 by Opta’s. Davis and Robberechts found two providers’ data disagreed about which team was the more dangerous in 13% of 2018/19 top-five-league matches. Pick one provider and stay with it.

What does it mean if a team scores fewer goals than its xG?

Over one match, very little — the difference is dominated by chance, and the arithmetic above describes what happened rather than explaining it. Over a season it is worth noticing and still not a measure of finishing skill, because it also contains every place the provider’s model and reality disagree.

What is a good xG per shot?

No published benchmark exists, and none is invented here. A team that takes six close-range chances and one that takes twenty from distance can have the same total xG and very different xG per shot, and neither is automatically better. Use it within one source.

Related calculators

References

  1. Whitmore J. “What are expected goals (xG)?” Opta Analyst (Stats Perform), theanalyst.com, 8 August 2023, updated 10 November 2023. “Opta’s xG model uses a machine-learning technique called XGBoost”, is “powered by nearly one million shots” from 40 competitions between 2018-19 and 2021-22, “evaluates how over 20 variables affect the likelihood of a goal being scored”, and gives every penalty a fixed 0.79 xG.
  2. FBref. “Expected Goals Model Explained.” fbref.com. “The model that FBref uses is provided by Opta.” The same goal is valued at 0.68 xG by an earlier model and 0.90 xG by Opta’s.
  3. Davis J, Robberechts P. “How data quality affects xG.” DTAI Sports Analytics Lab, KU Leuven, 1 July 2020. Summed team xG disagreed about which side was the more dangerous in 238 of the 1,826 top-five-league games of 2018/19 — 13% — when the same model was run on two providers’ event data.
  4. Opta Analyst (Stats Perform). “Opta football stats definitions.” theanalyst.com, July 2024. Pass completion: “successful passes are divided by total attempted passes”. Expected goals “measures the quality of a chance by calculating the likelihood that it will be scored”.