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. 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 Drawn Lost Juventus Olympiakos Malmo 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. Basel Ludogorets 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. Monaco Zenit St Petersburg Benfica 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. Anderlecht Galatasaray 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. Roma CSKA Moscow 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. Paris SG Apoel 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. Sporting Schalke Maribor 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. Shakhtar Athletic Bilbao BATE Borisov