The killings raise yesterday's death toll in shootings and bombings across the country to at least 83 people killed.
Gunmen first opened fire on the two houses shortly before midnight in the town of Latifiyah and then planted bombs around them, a police officer said.
Six children, five women and five men were killed, while nine people were wounded, he said.
Last Wednesday, gunmen shot dead a seven-member Shiite family in the same town, about 30 km south of Baghdad.
More From This Section
Sunni gunmen used to carry out brazen attacks against Shiite families in Sunni-dominated areas during the sectarian violence that engulfed the country after the US invasion and peaked in 2006 and 2007. That prompted Shiite militant groups to retaliate.
Shiite religious leaders and politicians have called for calm in response to the recent wave of violence, but some attacks on Sunni mosques are raising fears that Shiite armed groups are starting to retaliate.
More than 4,000 people have been killed over the past five months alone. That includes 804 Iraqis killed just last month, according to United Nations figures released earlier this week.