Two teams, same points: every league breaks the tie differently

8 September 2026 · 6 min read

Two clubs finish level on points. Which one goes above the other? Most developers answer "goal difference" and move on. That answer is right in England and wrong in Spain, and if you are sorting a table in your own code you have probably shipped the bug already.

The rules are not universal

Every league starts with points. After that they diverge, and the divergence is not cosmetic. A club can sit above another it trails on goal difference, because it beat that club twice.

These are the orders we apply, taken from each competition's own regulations:

CompetitionAfter points, in order
Premier LeagueGoal difference, goals scored
Ligue 1Goal difference, goals scored
LaLigaHead-to-head points, head-to-head goal difference, goal difference, goals scored
Serie AHead-to-head points, head-to-head goal difference, goal difference, goals scored
Primeira LigaHead-to-head points, head-to-head goal difference, goal difference, wins, goals scored
Süper LigHead-to-head points, head-to-head goal difference, goal difference, goals scored
BundesligaGoal difference, goals scored, head-to-head points, head-to-head goals, away goals
EredivisieGoal difference, goals scored, head-to-head points, head-to-head goal difference, head-to-head away goals
EFL ChampionshipGoal difference, goals scored, head-to-head points, wins, away goals
Champions LeagueGoal difference, goals scored, away goals, wins, away wins
Europa LeagueGoal difference, goals scored, away goals, wins, away wins
Conference LeagueGoal difference, goals scored, away goals, wins, away wins

Four of the twelve put head-to-head first. Three more use it, but only after goal difference has failed to separate anybody. Three cannot use it at all, for a reason worth understanding.

Why the European competitions are different

Each UEFA league phase is a single table of 36 clubs, and they do not all play each other. There is no head-to-head record between two clubs that never met, so the criterion is not merely unused, it is undefined. UEFA goes to goal difference, then goals scored, then away goals, which is why all three of its competitions share one row of this table.

The part that catches people out

A head-to-head criterion cannot be applied until every tied club has played every other tied club the full number of times. In a league where clubs meet twice, that means both fixtures have to be done.

So in October, LaLiga's head-to-head rule is dormant. Two clubs level on points are separated by goal difference, exactly as in the Premier League. The rule wakes up later in the season, and the table can reorder without a ball being kicked by the clubs involved.

If you compare a mid-season LaLiga table against your own sort and they agree, that does not mean your sort is right. It means the rule has not started yet.

What to do about it

Do not re-sort the table client-side. Every standings response already carries the position, and that position was computed with the competition's own rules:

curl -H "X-RapidAPI-Key: YOUR_KEY" \
  -H "X-RapidAPI-Host: la-liga2.p.rapidapi.com" \
  "https://la-liga2.p.rapidapi.com/standings"
{
  "data": [
    { "position": 1, "team": { "name": "Real Madrid" }, "points": 21, "goalDiff": 12 },
    { "position": 2, "team": { "name": "Barcelona" },   "points": 21, "goalDiff": 14 }
  ]
}

That ordering is not a mistake to correct. Barcelona are second on a better goal difference because Madrid took more points from the two meetings, and in Spain that comes first. Sorting this array by goalDiff would produce a table that disagrees with the league.

Render in the order you receive. If you need to sort for another reason, sort by position.

If you are building your own table anyway

Some people need to, for a projection or a what-if. Two things will bite you.

First, the mini-table. Head-to-head points are computed only among the tied clubs, using only the matches between them. Three clubs tied on 40 points produce a three-team table from their six meetings, and that table decides the order.

Second, the criteria are applied one at a time until one of them separates the clubs, and it is applied to the whole tied group rather than pairwise. A pairwise comparison sort is not the same thing and will produce a different answer when three or more clubs are level.

Both are the reason we compute it once, on the server, per competition.

More

Head-to-head records, and what they are actually good for

They settle ties in three leagues and fill every match preview. Tested as a predictor on 3,042 league matches, this season's form beat them.

Why we serve no table rather than half a season

A league table built from part of a season is not partial data, it is wrong data that looks right. The rule we apply, what it costs us, and why a 404 is the better answer.

How not to burn your free tier

Most quota goes on requests that could not have returned anything new. Read the cache headers you are already being sent, stop polling faster than the data moves, and know which plan the thing you are building actually needs.

Build a live football scoreboard

A working scoreboard in about 60 lines: what /matches/live returns, why you poll every 30 seconds and not faster, and why your API key must never reach the browser.

What's inside a match: lineups, events and ratings

A field-by-field walk through a match detail response: formations, starting elevens, the event timeline, and how to rebuild a goal-by-goal summary from it.

Try it

Every endpoint mentioned here is in the reference, and every listing has a free tier. Start on the front page.