About the xG Calculator

What is Expected Goals (xG)?

Expected goals (xG) is a statistical metric that estimates the probability that a given shot will result in a goal, based on factors such as shot location, angle to the goal, distance, defensive pressure, and body part used. Rather than simply counting goals or shots, xG evaluates the quality of each scoring opportunity.

This metric has become a standard tool in professional football analytics. Coaches, analysts, and broadcasters use xG to assess team and player performance more accurately than traditional statistics allow. A team that consistently creates high-xG chances is generating better opportunities, even if the scoreline does not always reflect it.

How Does This Tool Work?

This interactive simulator lets you recreate any shot scenario on a half-pitch. You place attackers, defenders, and a goalkeeper, select which attacker is taking the shot, then submit the scenario to the backend. The backend computes xG values using multiple academic models simultaneously, allowing you to compare how different approaches evaluate the same shot.

Each model uses different inputs and methodologies. Some rely primarily on distance and angle, while others incorporate defender positions, goalkeeper location, and shot context such as technique and body part. Seeing the outputs side by side highlights how model assumptions affect the estimated probability.

Implemented Models

The calculator currently implements models from the following academic papers. Each model takes a different approach to estimating xG, from zone-based probabilities to machine learning with positional data:

  • Rathke (2017) — Zone-based xG using historical goal percentages by pitch area.
  • Karim & Marwane (2023) — Introduces the Kos Angle as an optimizing parameter for xG models.
  • Matteotti & Sotudeh — Uses convolutional neural networks (CNNs) to estimate xG from spatial data.
  • Aggregated xG — A combined model that factors in player positions, density, and defensive context.

Why Use This Tool?

Most xG tools show a single value for a shot. This calculator is different because it shows how multiple academic models evaluate the same scenario. This is useful for:

  • Understanding how shot context (position, defenders, angle) affects xG across different models.
  • Learning about xG methodology by experimenting with player placements.
  • Comparing academic xG models side by side in an interactive environment.
  • Importing real match shots to see how models would have evaluated them.

References

  1. Rathke, Alex. "An Examination of Expected Goals and Shot Efficiency in Soccer." Journal of Human Sport and Exercise, vol. 12, no. 2, 2017, pp. 514-529. Available here.
  2. Anzer, Gabriel; Bauer, Pascal. "A Goal Scoring Probability Model for Shots Based on Synchronized Positional and Event Data in Football (Soccer)." Frontiers in Sports and Active Living, vol. 3, pp. 1-15, 2021. Available here.
  3. Karim, Hassani; Marwane, Lotfi. "The Kos Angle, an optimizing parameter for football expected goals (xG) models." International Journal of Computer Science in Sport, vol. 22, no. 2, pp. 49-61, 2023. Available here.
  4. Narayanan, Sachin; Pifer, N. David. "An xG of Their Own: Using Expected Goals to Explore the Analytical Shortcomings of Misapplied Gender Schemas in Football." Journal of Sport Management, vol. 38, no. 2, pp. 92-109, 2024. Available here.
  5. Matteotti, Matteo; Sotudeh, Hadi. "The Power of Pixels: Exploring the Potential of CNNs for Expected Goals (xG) in Football." Available here.
  6. Hewitt, James H.; Karakus, Oktay. "A machine learning approach for player and position adjusted expected goals in football (soccer)." Franklin Open, vol. 4, pp. 1-16, 2023. Available here.