The target had been Shia Muslims, a statement from the Sunni Islamist militant group’s Amaq news agency said.
It was the biggest suicide attack in Baghdad for three years.
The bombers blew themselves up among a crowd of shoppers at a second-hand clothes market in Tayaran Square.
The admission by the jihadist group, made via its accounts on the messaging app Telegram, came several hours after the attack.
Suicide bombings have become rare in Baghdad since IS was militarily defeated in the region at the end of 2017.
IS once controlled 88,000 sq km (34,000 sq miles) of territory from eastern Iraq to western Syria and imposed its brutal rule on almost eight million people.
Despite IS’s defeat on the battlefield, a UN report last August estimated that more than 10,000 IS fighters remained active in Iraq and Syria.
Sleeper cells continue to wage a low-level insurgency, operating mainly in rural areas and targeting security forces.
In Thursday morning’s attack, the first bomber rushed into the market and gathered a crowd around him by claiming to feel sick, an interior ministry statement said.
One stallholder told Reuters news agency: “He pressed the detonator in his hand. It exploded immediately and people were torn to pieces.”
The second bomber blew himself up as others came to help the victims, according to the ministry.
Witnesses said Tayaran Square had been busy following the easing of almost a year of coronavirus-related restrictions.
The last deadly suicide attack in Baghdad was in the same square in January 2018, when 35 people were killed.
Iraqi President Barham Saleh led condemnation of the latest attack, saying the government would “stand firmly against these rogue attempts to destabilise our country”.
Pope Francis, who plans to visit Iraq in March, sent a message to Mr Saleh “deploring this senseless act of brutality”.
The US, EU and UN also deplored the attack.
The 2018 attack took place just months before parliamentary elections and Iraq is planning another general election later this year.
The government recently announced that the planned vote would be rescheduled from June until October in order to give authorities more time to register voters and new parties. (Courtesy BBC)