The league table tells you what has happened. An Elo rating is a guess at how good the teams are right now.

That is an important distinction, especially in the middle of a season. One team might be high up after a friendly run of fixtures; another might have narrowly lost to strong opponents for several weeks. The points are real, obviously. But they are not always the complete picture when you want to compare teams or estimate an upcoming match.

That is what I wanted to build for Allsvenskan and Superettan on Fotbollsfeber: a shared Elo rating for both divisions, with history from 2000, match-by-match charts, and a list of the biggest upsets it has found.


Elo is pretty simple

Elo is a simple idea originally developed for chess. Every team has a number. When two teams play, the model calculates an expected result from the gap between those numbers. If the favourite wins, little changes; if the underdog wins, both teams move more.

The rating updates after every match. That makes it different from a league position:

  • it accounts for the quality of opposition
  • it changes after every match
  • it can be used before the next match, rather than only to summarise the previous one

There is no magic number in it. It is just a compact way to carry a team’s results, opposition, and gradual change forward.

Adapting it for Swedish football

A completely standard Elo implementation would have been fine, but I wanted to account for a few things that matter here: home advantage, a restrained goal-difference multiplier, and regression towards the average between seasons.

That last part matters. A team that ends a season exceptionally strong should not be treated as equally certain in the following year’s opening round. Squads, managers, and circumstances change. The rating retains the information, but softens it a little at the season boundary.

I also store a snapshot whenever a team’s rating changes. That sounds like a database detail, but it is what makes the history useful: you can see both where a team is today and how it got there.

Why Allsvenskan and Superettan belong in one pool

The bit I cared about most was not keeping the divisions separate.

Promotion and relegation are a real relationship between the divisions. A team promoted from Superettan should not arrive in Allsvenskan as a blank slate with an arbitrary starting number. The same is true in reverse: a relegated team still has relevant history.

In the shared pool, a team’s rating moves with it between divisions. There is also a correction because promotion can otherwise make a team’s rating look too generous. It is basically an answer to the question that comes up every autumn and spring: how much of a promoted team’s strength should carry over?

The result is more useful than a single number in a table. You can compare teams, open a team’s curve by season or by match, and look at matches where the result was furthest from what the model expected.

The history begins before the visible ranking

A recurring problem in rating models is the start. If every team begins at the same level and the results are published immediately, the first few rounds can measure luck more than strength.

I dealt with that by giving the model two hidden warm-up years. It replays historical results and gets to settle down before any ratings are shown. Once I had confirmed complete match data for both Allsvenskan and Superettan back to 2000, I moved the start back by ten years. The published history begins in 2002, but the model already has two seasons behind it.

That means the current rating does not need to rely on a hand-written 2009 seed table. It comes from real matches spanning more than two decades instead.

It also feeds the rest of the site

I did not want to build the ranking and stop there. When both teams have a current rating, Fotbollsfeber also uses it for a few other things:

  • the match page can show an Elo-based 1/X/2 estimate
  • the season simulation uses the rating while playing through the remaining fixtures
  • a team’s page shows its rating, rank, and trend over the last five matches
  • Allsvenskan Stryktipset predictions can select this specialised model ahead of the general Elo variant

The season simulation is the part where this matters most. A slightly bad estimate for one match is one thing. Use it across thousands of simulated seasons and it starts to matter. For Allsvenskan and Superettan, I would rather use a model that knows about the actual history of these divisions and movement between them.

The pros and cons of an Elo rating

The nice thing about Elo is how much it can do with so little input. The downside is that it only knows about that input.

Pros

  • It accounts for opposition. Beating the league leaders should say more than beating a side near the bottom, even if both matches are worth three points in the table.
  • It is always current. Every result updates the rating, so it reacts more quickly than a season-long average while still carrying useful history forward.
  • It is explainable. The model can show what it expected before a match and how the actual result changed each team’s rating afterwards.
  • It works with relatively little data. You need match results, not a full event-data feed or proprietary player metrics. That makes it a good fit for a long-running football site.
  • It has several useful outputs. The same rating can power a ranking, a match estimate, trend charts, upset detection, and a season simulation.

Cons

  • It only sees the information it is given. Basic Elo sees a result, not injuries, suspensions, tactical changes, xG, or a red card in the fifth minute.
  • The settings matter. Home advantage, the size of rating updates, goal-difference weighting, and season regression all require choices. Sensible choices help, but they are still choices.
  • It can be slow to recognise a sudden change. A rebuilt squad or a new manager can alter a team faster than a result-based rating can learn it.
  • Early-season ratings are uncertain. Even with historical warm-up data, there is simply less current evidence after three rounds than after twenty-five.
  • It estimates probabilities, not certainties. A team with a higher rating should be favoured, not assumed to win. Football is still very good at refusing to follow the spreadsheet.

What the rating does not know

An Elo rating does not know who picked up an injury in the warm-up, how a new manager is affecting the dressing room, or whether a team is resting players for a cup match. It does not see everything that happens in a match, either; it sees the result and its context in the model.

That is fine. The point is not to make an oracle or a tip to follow blindly. I wanted a consistent starting point that is more useful than gut feeling or league position on their own. When it says something unexpected, it is usually a reason to look closer, not a reason to stop thinking.

I’ll keep an eye on how well it calibrates over time and probably keep fiddling with the presentation. That is what side projects are for. For now, I mostly like that Fotbollsfeber has something a bit more interesting than another table of results.

You can explore the ranking at fotbollsfeber.se/allsvenskan/ranking.