The series of attacks by armed bandits occurred over the past 48 hours with 18 people killed each in villages of Kaduna and Katsina states and several others injured. The assailants burnt down houses, displacing the villagers.
Hundreds of people have been killed in northern Nigeria by criminal gangs carrying out robberies and kidnappings.
Such attacks have added to security challenges in Nigeria, which is struggling to contain Islamist insurgencies in the northeast and communal violence over grazing rights in central states.
The latest attack comes less than a month after President Muhammadu Buhari replaced his long-standing military chiefs amid worsening violence, with the armed forces fighting to reclaim other northeastern towns overrun by insurgents.