How many games are there in a tournament?

In keeping with the football spirit, I’m going to use the format of the FIFA World Cup as an example to show you how to calculate the total number of matches/games played in a tournament.

There are two cases that we need to consider:
1. The league stage – where every team plays every other team in a group
2. The knockout stage, which follows a structure like that shown in the picture above, until one team is declared the winner

I’ll derive a general formula for each stage that you can then apply to any tournament situation involving a league, a knockout, or both.

The League Stage

I’m sure you all know the format of a league, but I’ll define it explicitly anyway.

  • You have a bunch of n teams (or individuals, or anything else that you want to pit against one another).
  • Each team plays every other team once.

Some of you may have noticed that the structure of this problem is the same as the famous ‘handshake problem’. This is where there are n individuals at a party and they all must shake every other person’s hand. The problem is to work out how many handshakes there must be in total. If you don’t already know the answer, you might want to stop and think about how you might go about working this out before you read on.

Let’s consider some simple examples first. We will call our teams A, B, C… for simplicity.

Suppose there are 2 teams (so n=2) in our league table. Obviously, in this case, there can only be one match:

A vs B

What about when n=3? We now have:

A vs B B vs C
A vs C

So there are 2+1 = 3 matches in total. Note that I have put the matches into 2 different columns. I’ve put all of A’s matches in the first column and all of B’s in the second (that aren’t already in the first column). There’s a reason for this which will become clear in a moment.

For n=4 (the number of teams in each world cup group):

A vs B B vs C C vs D
A vs C B vs D
A vs D

So now there are 3+2+1 = 6 matches.

Clearly there’s a pattern forming. The total number of matches is given by:

1 + 2 + 3 +… + (n-2) + (n-1)

This gives us the answer, but it is quite cumbersome to calculate all of this when n becomes large. If there were 100 teams, it would take quite a while to work out 1 + 2 + 3… + 98 + 99. Luckily, there’s a formula that we can work out to make our lives a lot easier.

Look again at the pattern of matches that I wrote out for n=2,3,4. To make it simpler, lets just denote each match with a * and count the *’s:

n=2:
*

n=3:
* *
*

n=4:
* * *
* *
*

Hopefully, you can see that for n=5:
* * * *
* * *
* *
*

We seem to be getting nice neat triangles (which is why the totals are known in mathematics as ‘triangle numbers’). We all know how to find the total number of items in a grid: just multiply the number of rows by columns. Well, we can turn the above diagrams into nice grids by duplicating the diagram, turning it upside down and sticking it onto the end:

n=3:
* * *
* * *

n=4:
* * * *
* * * *
* * * *

n=5:
* * * * *
* * * * *
* * * * *
* * * * *

Now these grid totals are easy peasy to work out by multiplying the number of rows by number of columns:
• n=3: 3 x 2 = 6
• n=4: 4 x 3 = 12
• n=5: 5 x 4 = 20
• n=n: n x (n-1) = n(n-1)

Finally, since we want to work out only the number of white stars, we just halve our totals. This gives us the overall formula:

Number of matches in a league = 0.5n(n-1)

Of course, if we are in a league where every team plays each other twice, we can just multiply this number by 2. If they play each other 3 times then we can multiply by 3, and so on.

The Knockout Stage

Now we come to the second tournament format – the knockout stage. In this format, n teams are paired up in matches. The winners are then paired up in a second round of matches. This carries on until there is a final match between 2 teams, the result of which determines the winner of the tournament.

The total number of teams in a knockout competition must be a power of 2. This is because we are halving the number of teams at each stage, and the only way we can keep halving n until we get to 1 is if n is a power of 2.

For n=2, there is only one match and one round.

For n=4, there is a semi final round where there are 2 matches and a final where there is one match. Hence there are 3 matches in total (this is the example in the diagram at the top of the page).

For n=8, there are 4 matches in the first round, 2 in the second and 1 in the third. The total is 4+2+1 = 7.

Again, there is a pattern forming. In the previous case, there are 8/2 = 4 matches in the first round, 8/4 = 2 in the second and 8/8 = 1 in the final round.

So in general, we can say that:

  • 1st round = n/2 matches
  • 2nd round = n/4 matches
  • 3rd round = n/8 matches
  • Eventually, the final round has n/n = 1 match

Our formula is:

Total matches in a knockout tournament = S = n/2 + n/4 +… + n/n

(I’ve called the total S to make it easier to work with)

Like the league stage, we can simplify this into a neat formula using some clever maths.

First, we halve the entire sum so that:

S/2 = n/4 + n/8 +… + n/2n

Subtract this from our original S equation:

S – S/2 = n/2 + (n/4 – n/4) + (n/8 – n/8) +… – n/2n

You can see that most of the terms cancel each other out. The only ones that don’t are the first and last ones. Also, S – S/2 is just S/2, so:

S/2 = n/2 – n/2n

But n/2n is just 1/2 since we can cancel out the n from the numerator and denominator:

S/2 = n/2 – 1/2

Finally, we multiply both sides of the equation by 2 to get the overall formula:

Total matches in a knockout tournament = S = n – 1

Isn’t maths lovely? All of that complicatedness turns into a stupidly easy formula! Just subtract the number of teams by 1 to get the total number of matches in a knockout tournament.

Number of matches in the world cup

Let’s apply these 2 formulae to the world cup.

In the group stage of the world cup, there are 8 groups consisting of 4 teams each. Each of the groups is a mini league where each team plays each other team once. Using our first formula when n=4, we have 0.5 x 4 x (4-1) = 0.5 x 12 = 6 matches per group. Therefore, we will have 6 x 8 = 48 matches overall in the group stage of the world cup.

In the knockout stage, we have 16 teams, so there will be 16 – 1 = 15 matches in total.

This gives us 48 + 15 = 63 matches overall in the world cup. Or so it should be, but sneakily, the world cup has a third place playoff match added on to the end. So there are 64 matches in total.

These formulae have far more applications than just calculating matches in a tournament. Maybe you’ll be able to spot similar patterns in other situations and apply one of these formulae. That’s where the real magic of mathematics comes alive.

24 thoughts on How many games are there in a tournament?

  1. Hi.. I have a question. How can I calculate the number of matches in a tournament having 10 teams, but each team plays against any 5 randomly selected opponents only?

    • This is an extremely complicated question, and would require a much longer explanation than this one if I were to consider all possible permutations. You would need to impose some rules on the matching process (e.g. by creating groupings), since otherwise there would be situations that arise under random matchings where teams end up playing more than 5 games.

  2. hey,
    I have a question:
    In a local tournament which was played on a knockout basis, a total of 27 matches were played including the finals. How many teams participated in all?
    a) 28 b) 14 c) 29 d) 30

    Pls explain

    • To have a straight knockout tournament, you need a number of teams which is a power of 2. In which case, you cannot have 27 matches. You haven’t specified the nature of the tournament so there isn’t enough information to answer.

      • I know theer needs to be teams in the power of 2 coz only then u can have a final between 2 teams coz it breas down as 2^n to 2^(n-1)…2^1 and finally a winner..but then its said thre answer to this question is 28..

        Thanks anyways!

    • 28 teams because the formula of the knockout system is (n-1) if we put n=28 then it becomes (28-1) which is equal to 27 total matches

  3. Can you give me a table for league fixtures containing 7 teams who have to play each other twice.

  4. Hi, I am trying to find a rule for the knockout stages where “N” is equal to the number of starting teams and “K” to the round number. please help me find a rule ASAP. Thanks in advance

  5. The knockout question can be answered instantly without any algebra, even if the number of teams is not a power of two, if you assume that some teams get a bye. In other words, when the lots are drawn to see who plays whom, some teams get a free pass to the next round. At some point (“When?” might be another interesting question!) you will end up with a power of 2, even if it is 2^1.

    In that case, all you have to understand is that each team apart from the winner can only lose once, so the number of games must be equal to the number of losers, N-1.

  6. hy….if there are 27 teams in a tournament based on knockout system the winner of the tournament would win matches?
    the answer is 5. plz tell me how it is??

    • 2^5 = 32. That means there are 5 rounds when there are 32 teams in a straight knockout. With 27, it’s a maximum of 5, though some teams would have to get a ‘bye’ to the next round (and would end up playing 4 instead).

  7. Can you help me find a formula for determining a knockout tournament where there are four players per game? Something along the lines of an Uno tournament where n=number of players.

    I’ve been trying to figure it out by treating it as a standard knockout tournament where the top two players of each game proceed to the next round. But I don’t know if that would complicate or simplify the formula.

    To complicate matters, it would also be cool to calculate a double-elimination knockout tournament.

    Any help would be greatly appreciated.

  8. Neel, for world cup matches, in knockout stage how can we have 16 teams ? I didn’t get it. I mean initially we are having 32 teams. Right?

  9. 99 players participate in a knockout tournament to decide a champion, how many players should be given a bye in the first round such that from second round only winners can proceed to the next round.

  10. n := number of matches
    p := number of teams

    Hello, on a knockout stage there are 4 teams that will participate, but the number of matches are 4 too, as to my understanding that you defined how to calculate it, which is
    n = p-1

  11. For the Knockout Tournament, I have a better solution.
    f(n) -> total number of matches to be played if I have n teams.
    Proof that f(n) = n – 1.
    Assumption : Lets assume that X is the winner of the knockout tournament and only X chooses to play with some other player.

    Observation 1 : So by equivalence the number of matches that X plays is same as the total number of matches to be played.

    Observation 2 : So if X has to win then he will play with all n – 1 other players

  12. Amazing post. It made me reflect on how rusty I am at maths at the moment. Thank you for the easy information.

    I have a question, how about a double-elimination tournament? Winners side will be still n-1 matches. But, what about the losers bracket? What would be the formula? 🙂

    Thanks in advance.

Leave a comment Cancel reply

Time limit is exhausted. Please reload CAPTCHA.