Iran had already secured a place in the Round of 16 with wins over Guinea and Germany.
In their final group engagement at the Jawaharlal Nehru Stadium, the Asian nation scored through Mohammed Ghobeishavi (25th minute), Taha Shariati (29th) and Mohammad Sardari (89th) to top the group with nine points from three matches.
Germany, who beat Guinea 3-1 at Kochi in the other match of the day, finished second with six points, and will now travel to Delhi to play against Colombia in the knockout round.
While Iran, who topped this group, stay in Goa and will play against one of the third best teams from either Group A, B or F on October 17.
More From This Section
Keen to top the group, Asian powerhouse Iran employed five defenders and kept the rival attackers at bay, while finding the back of the net on three occasions.
After brief period of midfield battle, Iran slowly opened up the rival defence with raids from the flanks and Costa Rica started feeling panicky, conceded two penalty in a span of four minutes.
Under tremendous pressure in the face of Irani offensive, Costa Rica again conceded a penalty when defender Karin Arce needlessly pushed down Younes Delfi while going for an aerial ball inside the box. On this occasion, defender Shariati had no problem convented it.
Costa Rica, who needed a win to keep themselves in fray for the knockouts, found the going tough and were not allowed space by the Iranian defenders.
Iran, who held the midfield superiority, rounded off the tally through Sardari's strike off a through ball by Airhossein Hosseinzadeh.