What is xG in football?

Published on 20 Nov 2023 | Last updated on 01 Jul 2026 | Reading time: 8 minutes

What is xG in football?

The term xG in football stands for expected goals. It is a statistical metric that quantifies the quality of goal-scoring opportunities in a match. Instead of simply counting the number of goals a team scores, xG takes into account various factors such as the location of the shot, the type of shot, the angle, and other relevant data to assign a probability value to each goal-scoring opportunity.

In essence, xG provides a more nuanced understanding of a team's performance by evaluating the likelihood of a goal being scored based on the characteristics of the chances created. A higher xG value suggests that a team had more and/or better opportunities to score, while a lower xG value indicates fewer and/or less promising chances.

More and more analysts, coaches, and fans use xG to gain insights into a team's attacking and defensive efficiency. It helps assess whether a team is overperforming or underperforming based on the quality of their scoring opportunities. While xG doesn't predict the actual outcome of a game, it provides valuable information about the underlying performance.

How is xG in football calculated?

Expected Goals (xG) is calculated using a combination of statistical models and historical data. The exact formula can vary slightly depending on the specific model or platform, but generally, the process involves evaluating various factors associated with a shot to estimate the likelihood of it resulting in a goal. Here are some key components considered in xG calculations. The first three are more commonly used and the rest are dependent on the specific model:

  1. Shot Location:

    • The position on the field from which the shot is taken is a crucial factor. Typically, shots from closer to the goal or from more central positions are assigned higher xG values because they are more likely to result in goals.
  2. Shot Type:

    • Different types of shots (e.g., headers, volleys, one-on-ones) are assigned different values based on their historical conversion rates. For example, a one-on-one opportunity with the goalkeeper might have a higher xG value compared to a shot from outside the box.
  3. Angle of the Shot:

    • The angle at which the shot is taken can influence the xG value. Shots from more acute angles may have a lower xG value since they are generally more challenging to convert into goals.
  4. Build-Up Play:

    • Some xG models take into account the nature of the build-up play leading to the shot. For instance, a shot resulting from a well-executed team move might be assigned a higher xG value compared to a speculative long-range effort.
  5. Assists and Passes:

    • The assists and passes leading to the shot may be considered in the xG calculation. A shot resulting from a precise through ball might be assigned a higher xG value.
  6. Defensive Pressure:

    • Some models also incorporate information about the defensive pressure on the shooter. If a player is under little defensive pressure, the xG value might be adjusted accordingly.
  7. Game State:

    • The state of the game (e.g., scoreline, time remaining) may also be factored in. For example, a shot in the dying minutes of a close game might be given a higher xG value.

It's important to note that different analysts and platforms may use proprietary formulas for xG calculation, and the exact weightings of these factors can vary. Additionally, machine learning techniques, such as logistic regression, are often employed to train models on large datasets of historical shots and their outcomes, allowing the model to learn the relationships between various features and the likelihood of a goal being scored.

If you're not yet certain about the process of determining an xG rating, Opta has created an informative explanation that you can view in the video provided below.

How to take advantage of xG in football predictions?

Expected goals (xG) can be used in football predictions by incorporating statistical analysis and modeling to assess the potential outcome of matches. Here are some ways xG can be used in football predictions:

  1. Team Performance Analysis:

    • Evaluate teams based on their xG metrics over a series of matches. Teams consistently creating higher xG values may be considered stronger in attack, while those conceding fewer xG values might have a solid defense.
  2. Comparison of Teams:

    • Compare the xG stats of two competing teams to gauge their relative strengths and weaknesses. A team with a higher xG difference (xG for minus xG against) may be expected to perform better in upcoming matches.
  3. Player Analysis:

    • Analyze individual player performance by looking at their contribution to xG. Players who consistently contribute to creating high xG opportunities may be key to a team's success.
  4. Injury and Lineup Changes:

    • Consider how injuries or changes in the starting lineup may impact a team's xG performance. Losing a key striker or a top goalkeeper could affect a team's ability to create or prevent high-quality scoring opportunities.
  5. Home and Away Performance:

    • Assess how teams perform at home versus away using xG. Some teams may have a higher xG when playing at home due to factors like crowd support and familiarity with the stadium.
  6. Over/Under Betting:

    • Use xG data to make more informed decisions when betting on over/under goal markets. If teams have a history of high xG values, there may be a higher likelihood of more goals being scored.
  7. Expected Points:

    • Calculate expected points for teams based on their xG performance. This can provide a more nuanced assessment of a team's overall quality beyond just the traditional points table.

It's important to note that while xG can provide valuable insights, it should be used in conjunction with other relevant factors, such as team form, injuries, and other contextual information. Additionally, predicting football outcomes always involves an element of uncertainty, and unexpected events can influence the results of matches.

Example how to use xG in football predictions

Consider a match between Team A and Team B. Both teams have been performing well in the league, but you want to use xG to make a more informed prediction about the outcome of their upcoming match.

Steps:

  1. Collect Historical xG Data:

    • Gather historical xG data for both Team A and Team B over their recent matches. Look at their average xG for and xG against per game to understand their attacking and defensive strengths.
  2. Compare xG Metrics:

    • Compare the xG metrics of Team A and Team B. Suppose Team A has been consistently creating high xG values in recent matches, indicating a strong attacking performance. Team B, on the other hand, has a solid defense, conceding fewer xG.
  3. Consider Home/Away Performance:

    • Take into account the home and away performance of both teams. If Team A tends to have higher xG at home, this could be a factor in their favor. Similarly, if Team B has a strong away defensive record, it may affect the expected outcome.
  4. Injury Updates:

    • Check for any recent injuries or lineup changes for both teams. If Team A's star striker, who contributes significantly to their xG, is injured, it might impact their attacking capabilities.
  5. Calculate Expected Goals for the Match:

    • Estimate the expected goals for each team in the upcoming match based on their historical xG performance. Adjust for factors like home/away performance and recent form.
  6. Consider Contextual Factors:

    • Factor in any additional information, such as recent form, head-to-head records, and the importance of the match (e.g., a crucial game in the title race).
  7. Make a Prediction:

    • Based on your analysis, make a prediction for the match outcome. For example, if Team A has higher expected goals and favorable conditions, you might predict a win for Team A.

It's essential to remember that while xG provides valuable insights, no prediction method guarantees accurate results due to the unpredictable nature of football. Use xG as one of several tools in your analysis and consider the broader context of each match.

xG in other sports

While expected goals (xG) is most commonly associated with football (soccer), the underlying concept of quantifying the quality of scoring opportunities based on various factors can be adapted and applied to other sports as well. However, the specific metrics and calculations may vary depending on the nature of the sport. Here are a few examples of how similar concepts to xG can be applied in different sports:

  1. Hockey:

    • In ice hockey, analysts may use a concept similar to xG to evaluate the quality of scoring chances. Factors such as the location of shots on goal, the type of shot, and the goaltender's position can be considered to assess the likelihood of a goal being scored.
  2. Basketball:

    • Basketball analysts might develop a metric analogous to xG to evaluate the quality of shots taken during a game. Factors such as shot distance, shot type (e.g., layup, three-pointer), and defensive pressure could be considered to estimate the expected points from a given shot attempt. 
  3. American Football:

    • In American football, analysts could create a metric to assess the expected points for a team based on factors like field position, down, distance to the first down marker, and time remaining. This concept would be similar to xG but adapted to the unique dynamics of football.
  4. Cricket:

    • In cricket, analysts might develop a metric to assess the expected runs from a particular delivery. Factors such as the type of shot played, the location of the ball, and the skill level of the batsman and bowler could be taken into account.

The key is to adapt the concept to the specific dynamics and characteristics of each sport, considering the relevant factors that contribute to scoring opportunities or outcomes. The adoption of similar metrics in other sports depends on the availability of relevant data and the feasibility of capturing the nuances of the game.

Conclusion

In conclusion, expected goals (xG) is a valuable statistical metric primarily used in football (soccer) to quantify the quality of goal-scoring opportunities based on various factors such as shot location, type, angle, and more. It provides a more nuanced understanding of a team's performance beyond just counting the number of goals scored.

The concept of assessing the likelihood of success based on contextual factors is adaptable to other sports as well. While the specific metrics and calculations may vary, the underlying idea of quantifying the quality of scoring opportunities can be applied in sports like hockey, basketball, American football, and cricket.

Expected goals has become a popular tool for analysts, coaches, and fans to evaluate team and player performance, make predictions, and gain insights into the dynamics of a match. However, it's important to use xG as part of a broader analysis, considering other contextual factors and recognizing that even our football predictions are not foolproof in the unpredictable world of sports :)