Stockfish for Soccer?

Passing in soccer has never been so easy.

We have invented a new metric for how to quantify performance during a soccer match. Pass sequence xG, is a metric that measures the quality of a team's passing sequences. We have created a machine learning model using XGBoost that can take in a sequence of passes and predict the probability of a goal being scored involving those passes. This model has been trained on data from 2015/2016 seasons across the 5 biggest european leagues (La Liga, Premier League, Bundesliga, Serie A, and Ligue 1). The model has been extensively trained on 1823 games and resulted in 1.8 million passing sequences. In this article we will use our model to analyze passing sequences from the 2024 UEFA Euro Tournament.

Select a pass type and height for each pass. Hover over each selection to see more details.

All Final Passes in Sequence From 2024 UEFA Euro Tournament With a Pass Sequence xG below 10th percentile.

All Final Passes in Sequence From 2024 UEFA Euro Tournament With a Pass Sequence xG between 30th and 40th percentile.

All Final Passes in Sequence From 2024 UEFA Euro Tournament With a Pass Sequence xG between 60th and 70th percentile.

All Final Passes in Sequence From 2024 UEFA Euro Tournament With a Pass Sequence xG higher than the 90th percentile.

The glory of a switch, through ball, cross!

Select a pass type and height for each pass. Hover over each selection to see more details.

Lets start by looking at the goal of tournament. This goal was scored by Lamine Yamal in the 2024 UEFA Euros Semi-Final between Spain and France. It was undoubtedly an incredible finish, but how good was the pass sequence that led to his shot?

In the next sections we will dive into this chance and see how we can use our model to analyze the pass sequence.

UEFA Euro 2024 Logo

How do we define a pass sequence?



A pass sequence can be defined as a sequential list of passes where each pass has a set of features. Some of the features include start and end location, pass type, pass height. Using these features we can visually represent the sequence in 2D by plotting each pass as an arrow and making its size proportional to its position in the sequence. We can additionally color code the pass by it's outcome.

Try hovering over the passes to see more details!

If you would like a refresher on the different pass types, click here

What do you think is the probability that this pass sequence leads to a goal? Scroll to find out!

The probability of this pass sequence leading to a goal is Loading...

From now on, we will be referring to this probability as pass sequence xG (expected goals). This probability is extremely low and is a testament to the ability of Lamine Yamal to create and finish a chance given a bad situation. However, let's look at how the pass sequence xG could change if a different pass was played.

Try clicking the different options to see how the pass sequence xG changes!

Does this match your intuition? What do you think was the best passing option for this play?

Now let's take a look at the how many goals each team was expected to score given their pass sequences.

As we can see, Spain ranks very highly at all stages of the tournament. This was likely a major contributor to their success, as they won the entire tournament!

Pass Sequence Game

Based on what you know so far, try out our pass sequence game and try to get the highest probability possible!



Instructions:

1. Select the pass type, pass height, and then click on the pitch to set the starting position of the ball.

2. Click again to set the end position of the pass.

3. Repeat steps 1 and 2 to create a sequence of passes.

4. Once you have created a sequence, click the "Predict Play Probability" button to see the probability of the pass sequence leading to a goal.

5. Repeat steps 1-4 to try to get the highest probability possible!

Compare your score to all the passing sequences in the Euros!

Counter attacks have been a major talking point lately in soccer. A counter attack typically consists of gaining possession and making a short sequence of passes, usually 1-3, and then ending with a shot towards goal. Here we take a look at how the number of passes in a sequence affects the pass sequence xG.

Although the actual difference in pass sequence xG is not very large, about .7%, we see that a pass sequence xG of around 2.5% is in the 75th percentile of pass sequence xG. While a pass sequence xG of around 1.8% is in the 55th percentile.

This is a huge difference of 20 percentile points! The context of the passes is important and sequences that have a solid build-up can set up a "last pass" in a good position to create a goal.

Build up is important!

We've established that 5 passes is optimal. Now, we can take a look at the distribution of passes within those 5 pass sequences.

First thing that we can see is that goal kicks, free kicks, corners, and throw-ins all happen on the first pass of a sequence. This should match our intuition and general knowledge for how soccer works.

The next thing that is important to identify is the types of passes that can be labeled as sequence ending. We see that through balls, crosses, and cutbacks all tend to end sequences at least 50% of the time. We can attribute this to shots happening after each of these pass types.

If you don't know what a cross, cut back, switch, or through ball are, click here

Take a look at this heatmap to see information about shots and goals!

A majority of shots are taken from inside the box or just outside the 18-yard box, particularly from the central areas. Most goals are scored from inside the 18-yard box, with the highest xG coming from shots near the goal.

Combining this with the previous findings, we can see that the location and context of passes are crucial in determining their effectiveness. Through balls, crosses, and cutbacks are all sequence-ending passes that are played into dangerous areas. They often lead to shots on goal, and as a result, are more likely to result in high xG values.

The final pass of a sequence is the most important in influencing the probability of a goal. In the next couple sections we will look at how the final pass of a sequence affect the pass sequence xG.

Here we are looking at the worst 10% of final passes from passing sequences in terms of pass sequence xG. First thing we can see is that almost all the passes are incomplete. This makes sense, as if a pass is incomplete it is not likely to lead to a goal.

We also see that a lot of these passes come from goal kicks, free kicks, and passes in the defensive third and tend to be longer and in the air. In general, these passes are very hard to control as the team in possession and are hard to create good goal scoring opportunities.

Now we are looking at the final passes of sequences that have a pass sequence xG between 30th and 40th percentile. This is around where we see that more of these passes are complete compared to the previous percentiles.

A lot of these final passes are still being completed in the defensive third which is why they might not have as high of a pass sequence xG.

Also, this is around the percentile where we begin to see some attempts at crossing. We see that even incomplete crosses into the box have the same pass sequence xG as a completed pass in the defensive third.

It pays to get the ball into the box!

As we increase the percentile of pass sequence xG for the final passes displayed to between 60th and 70th percentile, we see the passes now shift into the attacking third. This higher percentile of xG for these passes is likely attributed to the fact these passes are now getting closer to goal and within shooting range.

Another key fact to note is that the types of passes are still simple. We have yet to see a large magnitude of through balls, crosses, or cutbacks.

We also can see that these passes are mostly on the ground. We can conclude that this upper middle percentile of passing sequences are simple sequences that move the ball up the field.

Lastly, we are now looking at the final passes with the highest pass sequence xG. These passes may even be the simplest of them all. We see what makes these passes so good is that they are able to successfully get the ball into the box.

We see the highest level of speciality in pass type as we see a spike in through balls, crosses, and cutbacks. This represents the increase in skill of the passer to be able to thread the ball through the defense.

We also see that while a lot of the passes are on the ground there are a good amount of passes in the air. This shows how these high probability chances just matter about successfully getting the ball into the box whether it is on the ground or in the air.

Now you can explore all the final passes of a sequence from the 2024 UEFA Euro Tournament!

Adjust the slider to control the percentile of the sequence xG for the final passes displayed.

Toggle the mode to see the passes or heatmap of pass end locations.

Click on the pie charts, or legend items, to further filter by pass type and pass height.

Lastly, click on the start slider animation to see how these final passes change as the percentile of the sequence xG increases.

Try and answer these questions:

1. What is the pass type that tends to have the highest pass sequence xG?

2. What height should you be passing the ball from the middle of the pitch? What about from the wings?

3. What area should you be passing the ball to in order to maximize the probability of a goal?

Now that we've have explored how the final pass affects the probability of a goal, we can take a look at what types of passes should be performed at each location of the pitch in order to maximize the probability of a goal.

Hover over each cell to see the best pass type for that location and what a good pass from that location would look like.



Looking at this we can separate the pitch naturally into three parts: the defensive third, the middle third, and the attacking third. We can see that the main goal of passes in the defensive third should be switches to open up the defense and create gaps in the midfield.

In the midfield, the goal is to penetrate the defense through the use of through balls in order to get the ball near the 18-yard box.

In the attacking third, a team should focus on cut-backs and crosses to get the ball into the box for goal scoring opportunities.

Let's take a look at the top 10 passing sequences that have the highest probability of leading to a goal.

Use the arrow buttons below the pitch to navigate through the sequences!

These sequences are very different, and every pass has lots of variation, except the final pass. In almost every sequence, the final pass is a cross or ground pass towards the middle of the box. Keep this in mind!

Your UEFA Euro Championship Final

Given all the insights we've gathered, how would you approach creating a successful pass sequence? Try out our game again and see if you can improve your score!

Check out the leaderboard to see how you rank against the best passing sequences!

Conclusion

In this article, we explored how a sequence of passes can be used to predict the likelihood of scoring a goal — a concept we refer to as pass sequence xG. Using real match data from UEFA Euro 2024, we examined the underlying features of effective passing sequences and how different elements contribute to increasing scoring probability.

A key takeaway from our analysis is the importance of the build-up phase. Far from being just a means of progressing the ball, the build-up creates the foundation for high-quality final passes. We highlighted how switches of play—lateral passes that shift the ball across the pitch—are especially effective in disrupting defensive structures and opening up space between lines. These types of passes consistently raised the pass sequencexG of subsequent actions by forcing defenders to reposition and creating exploitable gaps in the midfield.

We also identified the most dangerous zones on the pitch, offering insight into where players should aim to direct their attacks. Knowing where the threat is highest allows teams to shape their sequences more intelligently and maximize their offensive potential. Additionally, we examined how subtle variations in pass height and type—such as using through balls or lofted passes—can be strategically employed to overcome pressure and unlock better shooting opportunities.

To complement our findings, we’ve provided interactive tools that allow you to explore the influence of the final pass on a sequence’s xG. You can also build your own custom sequences to see how different combinations affect pass sequence xG. We invite you to dive in, experiment with different setups, and even analyze real moments from matches you watch. The next time you see a passing move unfold, consider what made it effective—or why it fell short—and use our model to test your observations.

Through this lens, we hope you gain a deeper appreciation of the strategy behind every pass and develop a new way to think about the beautiful game.

return to top

Appendix

Types of passes