We are heading into the final round of group matches at the 2018 World Cup.
Six teams have already qualified, but 10 spots are still up for grabs. Check out our permutations to see what the teams need to do to keep their World Cup hopes alive.
And here is how Fifa divides teams who are on the same number of points:
Fifa World Cup group ranking rules (in order)
1. Goal difference.
2. Goals scored.
If teams cannot be separated by that then…
3. Greatest number of points obtained in the group matches between the teams concerned.
4. Goal difference resulting from the group matches between the teams concerned.
5. Greater number of goals scored in all group matches.
Failing that…
6. Greater number of points obtained in the fair play conduct of the teams based on yellow and red cards received in all group matches.
And finally…
7. Drawing of lots by the Fifa organising committee.
Group A
Both Russia and Uruguay have qualified from the group. Russia will go through as winners if they avoid defeat against the South Americans in the final game.
Monday 25 June
Saudi Arabia v Egypt, Volgograd Arena, 15:00 BST
Uruguayv Russia, Samara Arena, 15:00 BST
Group winner plays runner-up in Group B. Runner-up plays Group B winner.
Group B
Things get a little bit more complicated here.
A point for Spain against Morocco would see them qualify.
If the Spanish lose they will go through if Portugal beat Iran or suffer a heavier defeat against Iran, or if that match is a low-scoring draw and Spain lose by no more than one goal.
Portugal will qualify with a draw against Iran.
If both Portugal and Spain suffer defeats then team with the bigger loss would be eliminated. If they both win then the team with the biggest win will finish top of Group B.
The top two teams currently have the same number of points, goal difference and goals scored – they are separated by Fair Play records (Spain have one yellow card and Portugal have picked up two).
If all these elements are equal then there will be a drawing of lots to decide their final group positions.
Iran will qualify with victory over Portugal – they would win the group unless Spain also won.
Monday 25 June
Iran v Portugal, Mordovia Arena, 19:00 BST
Spain v Morocco, Kaliningrad Stadium, 19:00 BST
Group winner plays runner-up in Group A. Runner-up plays Group A winner.
Group C
France are through to the knockout round – a point against Denmark would see them finish as group winners.
A point against France would see Denmark qualify, as would Australia’s failure to beat Peru. The Danes would top the group with victory.
In order for Australia to qualify they must beat Peru, hope Denmark lose and also better the Danes’ goal difference.
Tuesday 26 June
Denmark v France, Luzhniki Stadium, 15:00 BST
Australia v Peru, Fisht Olympic Stadium, 15:00 BST
Group winner plays runner-up in Group D. Runner-up plays Group D winner.
Group D
Croatia have qualified and will be group winners with a point against Iceland.
Nigeria will qualify with a win over Argentina. A point would be enough if Iceland do not beat Croatia.
If Argentina and Nigeria draw, Iceland will make the last 16 if they beat Croatia by a two-goal margin and also score at least one more than Nigeria.
Argentina will qualify with victory over Nigeria coupled with Iceland failing to defeat Croatia. If Iceland do beat Croatia, then Jorge Sampaoli’s side can still qualify if they beat Nigeria by two more goals than Iceland win their game. If Argentina and Iceland win and finish with identical records their fate will be decided by their disciplinary records and then the drawing of lots. Argentina have picked up three yellow cards and Iceland have none.
Tuesday 26 June
Nigeria v Argentina, Krestovsky Stadium, 19:00 BST
Iceland v Croatia, Rostov Arena, 19:00 BST
Group winner plays runner-up in Group C. Runner-up plays Group C winner.
Group E
A draw for Brazil against Serbia will be enough for a place in the knockout stage.
If both Brazil and Switzerland win then the group winner could be decided by disciplinary records: Brazil have three yellows, Switzerland four. If they both lose then it will be the second and third places potentially decided by the same process.
The Swiss will qualify with a draw against Costa Rica, or if Serbia lose to Brazil.
If Switzerland lose by one goal and Serbia draw, second place will be decided by goals scored. If the sides finish with identical records then Switzerland would go through because they beat Serbia.
Serbia will qualify if they defeat Brazil. A draw would be enough if Switzerland lose to Costa Rica by more than one goal.
Wednesday 27 June
Serbia v Brazil, Otkritie Stadium, 19:00 BST
Switzerland v Costa Rica, Nizhny Novgorod Stadium, 19:00 BST
Group winner plays runner-up in Group F. Runner-up plays Group F winner.
Group F
Mexico need only a point against Sweden to qualify and finish top. They will go through, irrespective of their own result, if Germany fail to beat South Korea.
Sweden are guaranteed to qualify if they better Germany’s result. They will top the group if they beat Mexico and better Germany’s result.
Germany will qualify if they win by two or more clear goals.
If both Germany and Sweden draw their games, then the team in the higher-scoring game will finish second. If the matches finish with the same score, then Germany will finish second because they beat Sweden.
South Korea can qualify if they beat Germany and Sweden lose, and finish with a better goal difference than those two teams.
Wednesday, 27 June
South Korea v Germany, Kazan Arena, 15:00 BST
Mexico v Sweden, Central Stadium, 15:00 BST
Group winner plays runner-up in Group E. Runner-up plays Group E winner.
Group G
England and Belgium have qualified and are the only two teams to have identical records going into their final match.
If they draw then the top two positions will be decided by the number of cards accumulated. England have two yellows and Belgium have picked up three.
If both teams have the same number of booking points then lots will be drawn to decide the final positions.
Thursday, 28 June
England v Belgium, Kaliningrad Stadium, 19:00 BST
Panama v Tunisia, Mordovia Arena, 19:00 BST
Group winner plays runner-up in Group H. Runner-up plays Group H winner.
Group H
Japan and Senegal require only a point in their respective games against Poland and Colombia to qualify.
Colombia will qualify with victory over Senegal. If Colombia win Japan will need to lose by fewer goals than Senegal to progress. Colombia can also qualify with a draw if Japan lose, because they have a better goal difference.
Thursday, 28 June
Japan v Poland, Volgograd Arena, 15:00 BST
Senegal v Colombia, Samara Arena, 15:00 BST
Group winner plays runner-up in Group G. Runner-up plays Group G winner.