OpenTactic
About
Launch App
← Back to Wiki
General4 min read

xG - Expected Goals

xG — Expected Goals Definition Expected Goals (xG) is a statistical metric that assigns a probability (0–1) to each shot, representing the likelihood of t

xG — Expected Goals

Definition

Expected Goals (xG) is a statistical metric that assigns a probability (0–1) to each shot, representing the likelihood of that shot resulting in a goal based on historical data from thousands of similar attempts.

History & Origins

The concept of quantifying shot quality has roots in the early 2010s. Sam Green is often credited with one of the earliest public xG models (2012), presented at the OptaPro Analytics Forum. Around the same time, Michael Caley developed influential public xG models that gained traction in football analytics Twitter and blogging circles.

However, the idea of expected goals was explored earlier in academic and proprietary contexts. Opta had internal shot probability models before the term "xG" became widespread. The metric gained mainstream visibility around 2017–2018 when broadcasters (notably Sky Sports and ESPN) began displaying xG during match coverage.

StatsBomb, founded by Ted Knutson in 2017, pushed the state of the art by incorporating freeze-frame data (positions of all defenders and the goalkeeper at the moment of the shot) into their xG model, making it significantly more accurate than location-only models.

How It Works

xG is fundamentally a classification problem. A model is trained on a large dataset of historical shots, labeled as goal or no goal, using features such as:

  • Shot location — distance and angle to goal (the most important single feature)
  • Body part — foot, head, other
  • Assist type — through ball, cross, set piece, etc.
  • Game state — open play, counter-attack, set piece, penalty
  • Defender and goalkeeper positioning — requires tracking or freeze-frame data
  • Previous action sequence — was it preceded by a dribble, a one-touch pass, etc.

Common modeling approaches range from logistic regression (simplest, still effective) to gradient-boosted trees and neural networks.

A basic model using only distance and angle can capture a large portion of shot quality variance. More sophisticated models add context features incrementally.

Key Properties

  • An xG of 0.35 means that historically, shots with similar characteristics are scored about 35% of the time
  • xG is additive: a team's total xG in a match is the sum of xG for all their shots
  • The difference between actual goals and xG over time can indicate finishing quality (or luck)
  • xG does not account for the identity of the shooter in most public models (though some proprietary ones do)

Current Discussion & Debates

  • PSxG - Post-Shot Expected Goals|Post-shot xG (PSxG): extends xG by incorporating where the shot was placed (shot trajectory, height, speed). This separates shot quality from finishing quality. Used by StatsBomb and others.
  • xG overperformance: whether consistently outperforming xG reflects genuine skill or regression-to-the-mean. Evidence suggests elite finishers (e.g., Messi, Lewandowski) can sustain mild overperformance, but large deviations tend to regress.
  • npxG - Non-Penalty Expected Goals|Non-penalty xG (npxG): penalties have ~0.76 xG and can skew totals. npxG strips them out for fairer comparison.
  • xG limitations: the metric doesn't capture shot creation quality, pre-shot movement, or psychological pressure. It's a snapshot of the moment the shot is taken, not the full buildup.
  • xG models vary: different providers (StatsBomb, Opta, FBref/American Soccer Analysis) produce different xG values for the same shot because of different training data, features, and modeling choices.

Accessing xG Data

  • StatsBomb Open Data — free event data including pre-computed shot.statsbomb_xg for select competitions (GitHub)
  • FBref — displays StatsBomb xG data publicly for major leagues
  • Understat — free xG data for top 6 European leagues
  • Can be computed from any shot dataset with coordinates using a trained model, or approximated with a lookup grid

Related Metrics

  • PSxG - Post-Shot Expected Goals — extends xG with shot placement data
  • npxG - Non-Penalty Expected Goals — xG with penalties excluded
  • xA - Expected Assists — xG credited to the passer instead of the shooter
  • xT - Expected Threat — values ball progression, not just shots
  • VAEP - Valuing Actions — comprehensive action valuation that includes shot value

Related Visualizations

  • Shot Maps — the primary visualization of xG data

Tags: #football #analytics #xG #metrics

OpenTactic

Open-source tactical board for the modern football community.

Product

  • Board
  • Roadmap
  • Changelog

Community

  • Wiki
  • Articles
  • Academy

Legal

  • Privacy
  • Terms
© 2026·Created byRAZT Studio