Expected Goals (xG)

A model-derived probability that a given shot will result in a goal, based on factors like shot distance, angle, type, game situation, and whether the shot is a rebound or rush chance.

Expected Goals (xG) assigns a probability between 0 and 1 to every shot attempt, reflecting how likely it is to become a goal given its characteristics. A shot from the slot on a 2-on-1 rush might be worth 0.25 xG, while a point shot through traffic might only be 0.03 xG. Summing these probabilities over many shots gives a team or player's expected goal total.

Hockey Alchemy's xG model uses an XGBoost machine learning model trained on over 500,000 NHL shots. It incorporates 32 features including shot distance, angle, coordinates, shot type, game situation (even strength, power play, etc.), whether the shot is a rebound or rush attempt, shooter speed, and prior event context. Blocked shots are assigned 0.0 xG, and empty-net situations use a dedicated formula rather than the ML model.

xG is the foundation of modern hockey analytics because it separates shot quality from finishing luck. A team that consistently out-xGs opponents is generating better chances, even if the actual goals don't reflect it in a small sample. Over time, xG differential is a much better predictor of future success than raw goal differential.

Formula

xG = P(goal | distance, angle, shot_type, situation, rebound, rush, ...)

Values range from 0.00 to ~0.95
Blocked shots = 0.0 xG
Empty nets use a separate formula

Frequently Asked Questions

What is a high xG shot?

Shots from the crease or inner slot (within 15 feet, direct angle) typically have xG values of 0.15-0.40. Rebound shots from close range can exceed 0.50 xG. By contrast, perimeter shots from beyond 40 feet are usually below 0.03 xG.

How is xG different from actual goals?

Actual goals are binary (0 or 1) and heavily influenced by randomness -- goalie performance, deflections, lucky bounces. xG represents the underlying shot quality and is far more stable and predictive over time. A player who scores 30 goals on 20 xG likely benefited from finishing luck that will regress.

What does it mean to "deserve" a win based on xG?

When a team has a higher cumulative xG than their opponent but loses, analysts say they "deserved" to win based on shot quality. This doesn't mean the result was wrong -- goals count regardless of xG -- but it suggests the losing team was the better team that night and was unlucky.

Does xG account for the goalie?

No. xG is goalie-independent -- it measures shot quality regardless of who is in net. This is by design: it allows us to evaluate shooters and goalies separately. GSAx (Goals Saved Above Expected) uses xG to evaluate goalie performance.

See the NHL Expected Goals leaders.