The overnight bombing in the Karrada district in central Baghdad also wounded 75 people, officials said.
IS issued a statement claiming the attack, identifying the bomber as an Iraqi who detonated an explosives-rigged vehicle targeting Shiite Muslims.
IS considers members of Iraq’s Shiite Muslim majority — including the women and children who were victims of the Karrada blast — to be heretics and frequently carries out attacks against them.
The bomber struck just days after the start of the holy Muslim fasting month of Ramadan, during which Iraqis often stay out late shopping or socialising after breaking their daily fast.
Images and footage posted on social media showed the devastating impact of the blast, which ripped through the crowded area around Al-Faqma ice cream shop, scattering rubble across the street.
One photo showed cups of ice cream scattered on the blood-stained ground.
Brett McGurk, the US diplomat coordinating the international coalition fighting IS, condemned the attack and expressed solidarity with Iraq.
“ISIS terrorists tonight in Baghdad target children & families enjoying time together at an ice cream shop. We stand w/Iraq against this evil,” McGurk said on Twitter, using an alternate acronym for IS.
IS overran large areas north and west of Baghdad in 2014, but Iraqi forces backed by coalition air strikes have since regained much of the territory they lost and are now fighting to retake the last jihadist-held areas in second city Mosul.
But defeats on the battlefield have not prevented IS from carrying out deadly attacks targeting civilians, including a bombing in Karrada district last year that killed more than 320 people.