One of the more persistent arguments in the Messi vs. Ronaldo debate is that Messi benefits from the playmakers around him. That Barcelona’s system inflates his numbers. That if you dropped him in a different team, the goals would dry up.
Anyone who’s actually watched Barcelona in recent seasons knows this is backwards. Messi is the system, and I’ll walk you through the data to prove it.
Meet xG
For a course in my master’s in AI program at the University of Georgia, I built a machine learning system that predicts football match outcomes using team and player form and stats. During the research phase, I came across a metric that’s been gaining traction in football analytics: Expected Goals (xG). I’d posted about this on Facebook already, but wanted to expand it with proper charts and data.
xG measures the probability that a given shot will result in a goal, based on historical data from shots taken in similar positions, angles, and conditions. A tap-in might have an xG of 0.85. A long-range volley might have an xG of 0.03. Aggregate a player’s xG across a full season and you get a picture of how many goals they should have scored, given the chances they had.
The interesting part is what happens when you compare actual goals to xG. If a player scores more goals than their xG, they’re converting chances at a rate above what’s historically normal for those types of chances. They’re overperforming. And if they do it consistently over multiple seasons, it’s not luck. It’s skill.
If you want to learn more about xG, I recommend Tifo Football’s excellent video.
The Data
I pulled xG data from understat.com for the top 5 European leagues (Premier League, La Liga, Serie A, Bundesliga, and Ligue 1) from 2014/15 through 2019/20. To reduce noise, I excluded any player who logged fewer than 2,000 minutes (≈ 22 full games) in a given season, roughly two-thirds of what a regular starter plays (2,800-3,200 minutes).
After filtering, 2,229 players qualified across the 6 seasons. For each, I calculated the cumulative difference between actual goals scored and expected goals.
2018/19 Season
Starting with the 2018/19 season, where 809 players met the minutes threshold:
| Player | Goals | xG | Difference |
|---|---|---|---|
| Lionel Messi | 36 | 26.0 | + 10.0 |
| Iago Aspas | 20 | 12.5 | + 7.5 |
| Antonin Bobichon | 7 | 1.7 | + 5.3 |
| Sadio Mane | 22 | 16.8 | + 5.2 |
| Kai Havertz | 17 | 12.0 | + 5.0 |
| Jonathan Bamba | 13 | 8.2 | + 4.8 |
| Cristhian Stuani | 19 | 14.4 | + 4.6 |
| Jadon Sancho | 12 | 7.4 | + 4.6 |
| Cristiano Ronaldo | 21 | 23.3 | -2.3 |
Messi leads by a massive margin. +10.00 vs. the next player’s +7.53. He scored 36 goals from chances that should have produced 26. That’s 10 extra goals from pure finishing quality.
Ronaldo, ranked 767th out of 809, actually underperformed his xG. He scored 21 goals from chances worth 23.32 xG. His first season at Juventus was fine by any normal standard, but in terms of goal conversion quality, he was in the bottom 5% of qualifying players in Europe.
All 6 Seasons
A single season can be noisy. So let’s look at the full 6-season window, where the sample sizes are large enough that luck doesn’t explain anything:
| Player | Goals | xG | Difference |
|---|---|---|---|
| Lionel Messi | 201 | 165.7 | + 35.3 |
| Harry Kane | 140 | 116.0 | + 24.0 |
| Antoine Griezmann | 103 | 79.7 | + 23.3 |
| Son Heung-Min | 60 | 42.2 | + 17.8 |
| Iago Aspas | 89 | 72.6 | + 16.4 |
| Ciro Immobile | 103 | 86.7 | + 16.3 |
| Eden Hazard | 62 | 46.1 | + 15.9 |
| Alexandre Lacazette | 103 | 88.0 | + 15.0 |
| Cristiano Ronaldo | 186 | 180.1 | + 5.9 |
Messi’s cumulative overperformance is +35.3, which is 11 goals clear of second-place Harry Kane at +24.0. Over 6 seasons and 208 games, Messi scored 201 goals from chances that the xG model says should have produced 166. That’s 35 extra goals from finishing quality alone.
Ronaldo is at #55 with +5.9. He scored 186 goals from 180.1 xG worth of chances. He is a great goalscorer, but the data shows that his goal output is largely explained by the volume and quality of chances he gets (a credit to his positional awareness getting into scoring positions). Messi’s is not.
Actual Goals vs Expected Goals
| Player | Actual Goals | Expected Goals (xG) | Difference |
|---|---|---|---|
| Lionel Messi | 201 | 165.7 | +35.3 |
| Cristiano Ronaldo | 186 | 180.1 | +5.9 |
The scatter plot makes it visual. Every player above the dashed line is overperforming their xG, every player below is underperforming. Most players cluster tightly around the line. Messi is the clear outlier above it. Ronaldo, despite his higher raw xG (he gets more and better chances), sits almost exactly on the line.
What This Actually Means
xG overperformance measures one thing: how well a player converts the chances they receive relative to what those chances are historically worth. It doesn’t capture playmaking, dribbling, assists, or any of the other things Messi dominates. It’s purely about finishing.
And that’s exactly why it’s useful here. The “Messi benefits from his team’s creativity” argument implies that Messi’s goal numbers are inflated by the quality of service he gets. xG already accounts for that. It measures the quality of each chance based on where and how the shot was taken. If Messi’s teammates were creating easy chances for him, his xG would be high and his overperformance would be average. Instead, his xG is high and his overperformance is historically exceptional.
Ronaldo is an excellent player and may be the second-best of all time. His #55 ranking here isn’t a reflection of his overall quality. But this is another metric where Messi leads, and by a significant margin.
Tags: #ai #data #football
