The blasts in the Sadr City area, at least one of which was a suicide bombing, also wounded at least 55 people.
The bombings were the deadliest attacks to hit the capital this year.
There was no immediate claim of responsibility for the attacks, but suicide bombings are a tactic almost exclusively employed in Iraq by Sunni militants, especially members of the Islamic State jihadist group.
IS considers Shiite Muslims, who make up the majority of Iraq's population, to be heretics and frequently targets them with bombings and other attacks.
Those bombings took place in Shuala, another Shiite-majority area in northern Baghdad.
While attacks are still common in Baghdad, violence in the capital has decreased significantly since IS launched a sweeping offensive in June 2014, after which many of its militants became occupied with fighting in other areas.