Your team dominates a match. Twenty shots, the ball pinned in the opponent's half for ninety minutes, and yet the final whistle brings a 0–1 loss to a single counter-attack. "We were unlucky," the manager says. The fans nod. But how would you actually know it was bad luck and not bad finishing, or simply a pile of poor shots?
That question is exactly why expected goals, or xG, went from a niche analytics idea to a number you now see on broadcasts, in match reports and in club recruitment meetings. This guide explains what xG measures, how it is built, where it misleads, and how to read it like someone who has watched a few hundred matches.
What xG Actually Measures
In one sentence: xG is the probability that a given shot becomes a goal, expressed as a number between 0 and 1. A shot with an xG of 0.10 is one that, historically, goes in about 10% of the time. A penalty is usually rated around 0.76 to 0.79, because roughly three out of four are scored. A hopeful effort from 35 yards might be 0.02.
Add up the xG of every shot a team takes in a match, and you get a measure of the quality of chances created, not just their quantity. Twenty shots at 0.03 each is an xG of 0.6. Two clear one-on-ones at 0.35 each is an xG of 0.7. The second team created better chances despite taking a tenth of the shots.
xG does not tell you who deserved to win. It tells you how many goals an average finisher would have scored from the chances on offer.
That distinction matters. xG is a description of chance quality, built from thousands of past shots, and it is silent about the particular striker who happened to take the shot.
How a Model Builds the Number
Every provider has its own recipe, but the skeleton is the same. Analysts take a huge database of historical shots, label each one as goal or no goal, and train a statistical model, often a logistic regression or a gradient-boosted tree, to predict the outcome from features of the shot.
Common inputs include:
- Distance to the goal and the angle of the shot (how much of the goal the shooter can "see").
- Body part: headers convert far less often than shots with the foot.
- Type of assist or play: a through ball, a cross, a set piece, a rebound.
- Game state: was it a fast break, or a settled attack?
- Defensive context in richer models: how many defenders sit between the ball and the goal, and where the goalkeeper stands.
The simplest models use only location. Richer ones use tracking data and can tell the difference between a shot taken with a clear view and the same shot taken through a crowd of legs. That is why two sites can report slightly different xG for the same match: they trained different models on different data. Neither is "wrong"; they are different estimates of the same probability.
A toy version makes the idea concrete. Here is a minimal sketch in Python of how you might turn distance and angle into a probability:
import math
def toy_xg(distance_m: float, angle_deg: float, header: bool = False) -> float:
"""A deliberately simple, illustrative model, not a real provider's."""
# Closer and wider-open angles raise the chance; headers lower it.
z = 1.2 - 0.13 * distance_m + 0.025 * angle_deg - (0.9 if header else 0.0)
return 1 / (1 + math.exp(-z)) # logistic function squeezes z into 0-1
print(round(toy_xg(8, 40), 2)) # central shot from the penalty spot area
print(round(toy_xg(30, 15), 2)) # long-range effort
print(round(toy_xg(6, 35, header=True), 2))Real models are fitted to data rather than hand-tuned like this, but the logic is identical: features go in, a probability comes out.
Reading a Match Through xG
Back to our opening scenario. Suppose the dominant team's twenty shots add up to an xG of 1.4, while the winners' three shots total 1.1. Now the story changes: the result looks much less like robbery. The losing side was somewhat better, but not by a landslide, and a 0–1 outcome is entirely ordinary in a low-scoring sport.
This is the real power of xG. Football has few goals, so results contain a lot of noise. A single deflection can decide a match. Over one game, xG is a gentle guide; over 10 to 20 matches, it becomes much more reliable, because luck evens out and the underlying quality of chances starts to show through.
Analysts therefore lean on cumulative views: a team's xG for and xG against across a season, or the difference between actual goals and xG. A team scoring well above its xG for months is usually either blessed with an elite finisher or riding a hot streak that is likely to cool.
| What you see | What it often means |
|---|---|
| Goals far above xG over a long run | Elite finishing, or luck that may fade |
| Goals far below xG over a long run | Poor finishing, or bad luck that may reverse |
| High xG against, low goals conceded | A very good goalkeeper, or fortune |
| Many shots, low xG per shot | Lots of speculative efforts, little real danger |
Where xG Misleads You
Every useful number has blind spots, and xG has several worth knowing.
It ignores who is shooting. Most public models treat a shot from a world-class striker and a shot from a defender the same if the location matches. In reality, elite finishers may beat the model slightly year after year, though the effect is smaller than most fans assume.
It treats shots as independent. A team that is leading may sit back and take few shots; a team that is losing may hurl in desperate ones. Game state quietly shapes the xG totals.
Small samples lie. One match, or even five, can be dominated by two or three big chances. Treat single-game xG as a conversation starter, not a verdict.
It only counts shots. Great build-up that ends with a defender's last-second block never becomes a shot, so it may not show in xG at all. Related metrics, such as expected threat or possession value, try to capture that earlier danger.
A number is a lens, not a verdict. xG sharpens your view of a match; it does not replace watching one.
How Clubs and Fans Actually Use It
Inside clubs, xG sits alongside video and scouting rather than replacing them. Recruitment teams look at a striker's xG per 90 minutes to see whether he consistently gets into good positions, which tends to be a more repeatable skill than finishing hot streaks. Coaches check whether a tactical change produced better chances, not just more of them. Analysts use xG against to see whether a defence is genuinely solid or merely lucky.
For fans, the easiest habit to build is a simple one: after a surprising result, look at the xG before you decide what it meant. You will find that many "robberies" and "masterclasses" were less lopsided than they felt, and that a few quiet wins were quietly impressive.
The Takeaway
xG converts a messy, low-scoring sport into something you can reason about: it asks how good the chances were, not just how many there were. Use it over longer stretches, remember that different providers give slightly different numbers, and pair it with your own eyes. Do that, and the next time someone shouts "we were unlucky," you'll have a better way to check.
Football will always keep a little magic that no model can price. That is part of why we keep watching.


