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 differencesYour team 1.85 xG and 1 goal from 14 shots; the opponent 0.74 xG and 2 goals
What is computed here, and what is not
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
What this page will compute with xG, and what it refuses to
| Calculation | Defensible? | Why |
|---|---|---|
| xG difference: your xG minus the opponent’s | Yes, from one provider for one match | A subtraction of two figures the provider published together |
| Goals minus xG | Yes, same condition | Both numbers are published for the match; their difference is a description rather than a skill measure |
| xG per shot from your own totals | Yes, same condition | A rate on two published counts, which refuses when shots are zero |
| Computing the xG of a shot | No, and this page does not | There 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’s | No | The 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 probability | No | Out of scope across this entire site |
What the published descriptions say goes into an xG model
| Feature | Who names it, and what they say about it |
|---|---|
| Distance to goal, and angle to goal | Opta Analyst and FBref — in every description read for this page |
| Body part and shot type | Opta Analyst and FBref. Opta lists the foot used, the volley, the header and the one-on-one separately |
| Pattern of play | Opta Analyst and FBref: open play, a fast break, a set piece |
| The previous action, such as the type of assist | Opta Analyst |
| Goalkeeper position | Opta Analyst, which calls it “one unique and innovative feature” — itself evidence that it is not in every model |
| Clarity of the goal mouth | Opta Analyst and FBref, computed from where the other players are |
| Pressure from defenders | Opta Analyst and FBref |
| Penalties | Opta Analyst — given a fixed 0.79 xG rather than modelled at all |
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
- 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.
- 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.
- 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.
- 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”.
