Soccer Expected Goals Calculator
Estimate expected goals (xG) from shot location, angle, and assist type. Enter values for instant results with step-by-step formulas.
Formula
xG = 0.85 x e^(-0.1d) x sin(angle) x ShotMod x AssistMod x DefenderMod
Where d is distance to goal in yards, angle is the shot angle in degrees relative to the goal line, ShotMod adjusts for shot type (foot, header, volley, etc.), AssistMod adjusts for the type of pass preceding the shot, and DefenderMod penalizes for nearby defender pressure. The result is a probability between 0 and 1.
Worked Examples
Example 1: Penalty Area Shot After Through Ball
Problem: A right-footed shot from 16 yards at a 25-degree angle, following a through ball in open play with 2 defenders nearby.
Solution: Distance factor: e^(-0.1 x 16) = 0.202\nAngle factor: sin(25 degrees) = 0.423\nBase xG: 0.85 x 0.202 x 0.423 = 0.0725\nShot type (foot): x 1.0 = 0.0725\nAssist type (through ball): x 1.25 = 0.0906\nBody part (right foot): x 1.0 = 0.0906\nDefender pressure (2): x 0.76 = 0.069\nFinal xG: 0.069 (6.9% chance of scoring)
Result: xG: 0.069 | 6.9% scoring probability | Zone: Penalty Area | Quality: Low
Example 2: Close-Range Header From Cross
Problem: A header from 6 yards at a 40-degree angle following a cross with 1 defender nearby.
Solution: Distance factor: e^(-0.1 x 6) = 0.549\nAngle factor: sin(40 degrees) = 0.643\nBase xG: 0.85 x 0.549 x 0.643 = 0.300\nShot type (header): x 0.55 = 0.165\nAssist type (cross): x 0.85 = 0.140\nDefender pressure (1): x 0.88 = 0.123\nFinal xG: 0.123 (12.3% chance of scoring)
Result: xG: 0.123 | 12.3% scoring probability | Zone: Six-Yard Box | Quality: Average Chance
Frequently Asked Questions
What are expected goals (xG) in soccer and how are they calculated?
Expected goals (xG) is a statistical metric that quantifies the probability of a shot resulting in a goal based on historical data from hundreds of thousands of shots. Each shot is assigned an xG value between 0 and 1, where 0 means zero chance of scoring and 1 means the shot is certain to be a goal. The calculation considers factors like shot distance from goal, shot angle relative to the goalposts, body part used, type of assist, defensive pressure, and whether it was open play or a set piece. Modern xG models use logistic regression or machine learning trained on data from providers like Opta, StatsBomb, or Wyscout, analyzing over a million shots to establish probability patterns. A penalty kick has an xG of approximately 0.76, while a header from 18 yards might have an xG of only 0.03.
How does shot distance affect expected goals values?
Shot distance is the single most influential factor in xG calculations, with a strong exponential relationship between distance and scoring probability. Shots from inside the six-yard box (within 6 yards of goal) have average xG values of 0.35 to 0.50, meaning roughly one in every two to three shots from this zone results in a goal. From the penalty spot at 12 yards, xG drops to about 0.15 to 0.20 for open play shots. At the edge of the penalty area (18 yards), xG typically ranges from 0.05 to 0.10. Beyond 25 yards, xG drops below 0.03, meaning fewer than 3 percent of such shots are converted historically. This exponential decay reflects the increasing difficulty of beating the goalkeeper as distance gives them more reaction time and the target area appears smaller.
Why is the shot angle important for expected goals calculations?
The shot angle determines how much of the goal the shooter can see from their position, directly affecting the available target area for scoring. A central position provides the widest angle to the goal, offering the largest visible target, while positions near the byline produce extremely narrow angles that require precise placement to score. Mathematically, the angle is calculated as the angle subtended by the two goalposts from the shooter position, which shrinks rapidly as the player moves toward the sideline. A shot from 12 yards in the center might have a 35-degree angle to the goal, while the same distance from near the post reduces the angle to under 10 degrees. This geometric relationship means that even close-range shots from tight angles have surprisingly low xG values.
What is the difference between xG and actual goals scored?
The difference between a player or team expected goals total and their actual goals scored reveals important information about finishing quality and luck. A player who consistently outperforms their xG, scoring more goals than expected, may possess elite finishing ability, as demonstrated by players like Lionel Messi and Robert Lewandowski who regularly exceed their xG. However, significant and sustained overperformance is statistically rare, and most players who dramatically outscore their xG in one season tend to regress toward their xG in subsequent seasons. Teams can also overperform or underperform xG. If a team has an xG of 60 but scores only 45 goals, they may have poor finishers or face exceptional goalkeeping. This metric helps analysts separate skill from luck and predict future performance more accurately than raw goal tallies.
How are penalties represented in the expected goals model?
Penalty kicks are treated as a special category in xG models because they occur under standardized conditions with a fixed distance of 12 yards and a one-on-one situation against the goalkeeper. The historical conversion rate for penalties across major European leagues is approximately 76 to 78 percent, so penalties are typically assigned a fixed xG of 0.76 regardless of other factors. Some advanced models adjust this slightly based on the specific penalty taker historical conversion rate, but most standard models use the population average. Penalties significantly inflate xG totals, which is why analysts often report both total xG and non-penalty xG (npxG) when evaluating players. A striker with 20 xG including 8 penalties has a very different open-play shooting profile than one with 20 xG from entirely open play situations.
What are the limitations of expected goals models?
Despite its utility, xG has several important limitations that users should understand. Most xG models do not account for the specific goalkeeper ability, the exact positioning of defenders, the speed at which the shooter received the ball, or the game state and psychological pressure. Shot placement within the goal frame is typically not included in pre-shot xG models, though post-shot xG models do incorporate this data. Binary xG values cannot capture the full complexity of finishing technique, as a player who consistently strikes the ball into the top corner creates higher-quality attempts than what standard xG reflects. Additionally, xG models are trained on historical data that may not represent current tactical trends, and they perform less reliably for rare events like long-range strikes or free kicks where sample sizes are smaller.