Champions League: Who needs to do what?

Mathematics can muddle even the sharpest footballing brains - just ask Manuel Pellegrini.

Twelve months ago, the Manchester City manager was criticised for apparently not realising one more goal in their 3-2 win at Bayern Munich would have put them top of Group D  and pointed towards an easier Champions League last-16 tie.

But the Chilean need have no permutation problems this season - thanks to BBC Sport's handy Champions League guide.

Here's what City, Liverpool and the rest need to do in the final round of group games, while Chelsea, Arsenal and nine other teams are already through to the knockout stages.

Group A

Atletico Madrid are already through and will top Group A so long as they do not lose by more than one goal to Juventus on the final day.

Juventus need a point to qualify, and can top the group if they beat Atletico by two goals or more. However, if they lose that could let in Olympiakos.

The Greek side would go through if they beat Malmo and Atletico Madrid see off Juventus, courtesy of their head-to-head record with the Italian side.

Malmo will qualify for the Europa League at the expense of Olympiakos if they beat the Greek side.

As it stands

Played

Won

Drawn

Lost

GD

Points

Atletico Madrid

5

4

0

1

+11

12

Juventus

5

3

0

2

+3

9

Olympiakos

5

2

0

3

-5

6

Malmo

5

1

0

4

-9

3

Group B

Real Madrid have won the group leaving Liverpool and Basel to battle for second place.

A point will be enough for Basel to qualify for the knockout stage, while Liverpool must win to progress.

Ludogorets can qualify for the Europa League if they beat Real Madrid. A draw would be enough if Basel beat Liverpool.

As it stands

Played

Won

Drawn

Lost

GD

Points

Real Madrid

5

5

0

0

+10

15

Basel

5

2

0

3

-1

6

Liverpool

5

1

1

3

-4

4

Ludogorets

5

1

1

3

-5

4

Group C

Bayer Leverkusen are through because second-placed Monaco and third-placed Zenit St Petersburg play each other. A win against Benfica will guarantee top spot.

Monaco will progress with a draw or victory against Zenit. Either result would also see them take first place if Leverkusen lose to Benfica, with the German side having lost to Monaco home and away.

The Ligue 1 side will also finish first if they win and Leverkusen fail to win their final game.

Zenit need to beat Monaco to qualify, and will top the group if Leverkusen lose to Benfica as well.

As it stands

Played

Won

Drawn

Lost

GD

Points

Bayer Leverkusen

5

3

0

2

+3

9

Monaco

5

2

2

1

+1

8

Zenit St Petersburg

5

2

1

2

0

7

Benfica

5

1

1

4

-4

4

Group D

Both Arsenal and Borussia Dortmund have qualified for the knockout stage, while Anderlecht will finish third and secure their place in the Europa League.

That means the only thing to be decided is who will finish as group winners.

Dortmund are in the stronger position because their superior goal difference over Arsenal means a point against Anderlecht should be enough.

Arsenal, however, need to beat Galatasaray and hope Dortmund lose to Anderlecht to take first place.

As it stands

Played

Won

Drawn

Lost

GD

Points

Borussia Dortmund

5

4

0

1

+10

12

Arsenal

5

3

1

1

+4

10

Anderlecht

5

1

2

2

-2

5

Galatasaray

5

0

1

4

-12

1

Group E

Manchester City will progress to the last 16 if they beat Roma in Italy and CSKA Moscow fail to defeat group winners Bayern Munich in Germany.

Premier League champions City can still progress if they secure a score draw and CSKA Moscow lose to Bayern.

However, if both games end in a draw, then Roma progress.

CSKA Moscow must beat Bayern, and hope Roma do not beat City, to qualify. If CSKA and City both win then the Russians will qualify because of their superior head-to-head record.

Any of the bottom three sides could finish in the Europa League.

As it stands

Played

Won

Drawn

Lost

GD

Points

Bayern Munich

5

4

0

1

+9

12

Roma

5

1

2

2

-4

5

CSKA Moscow

5

1

2

2

-4

5

Manchester City

5

1

2

2

-1

5

Group F

Barcelona and Paris St-Germain are already assured of their place in the knockout phase.

The pair meet at Barcelona's Nou Camp in their final match to decide who will finish as group winners.

A win or draw will see the French champions finish top, but a home win will see five-time European champions Barca overtake them.

Dutch champions Ajax know they will finish third with a win or draw against Apoel Nicosia at the Amsterdam Arena and qualify for the Europa League. But the Cypriot side will overtake them with a win.

As it stands

Played

Won

Drawn

Lost

GD

Points

Paris SG

5

4

1

0

+5

13

Barcelona

5

4

0

1

+8

12

Ajax

5

0

2

3

-6

2

Apoel

5

0

1

4

-7

1

Group G

Premier League leaders Chelsea booked their place in the last 16 with a comfortable 5-0 win at German side Schalke in their penultimate group game.

That means third-placed Schalke must beat Maribor, and hope Sporting Lisbon lose at Chelsea, to progress.

If Schalke win and Sporting draw, then the Portuguese side will qualify courtesy of their superior head-to-head record.

Maribor cannot finish in the top two, but would finish third and clinch a Europa League place by beating Schalke.

As it stands

Played

Won

Drawn

Lost

GD

Points

Chelsea

5

3

2

0

+12

11

Sporting

5

2

1

2

+2

7

Schalke

5

1

2

2

-6

5

Maribor

5

0

3

2

-8

3

Group H

Qualification for the knockout phase has already been settled, with Porto finishing as group winners and Shakhtar Donetsk claiming second place.

So the attention turns to the battle for third place. Athletic Bilbao will move into the Europa League if they win or draw their home match against BATE Borisov, who have to win to leapfrog their opponents.

As it stands

Played

Won

Drawn

Lost

GD

Points

Porto

5

4

1

0

+12

13

Shakhtar

5

2

2

1

+11

8

Athletic Bilbao

5

1

1

3

-3

4

BATE Borisov

5

1

0

4

-20

3