Samuel Aruwan, a spokesman for Kaduna state's governor, said Friday that the victims include 22 children.
He blamed a "criminal element" for the deaths, which have taken place this week, in the Kajuru local government area.
One resident blamed the killings on fighting between Christian farmers and Fulani Muslim herdsmen.
Deadly clashes between the two communities have erupted in recent years in southern Kaduna as the groups compete for land and water.
Nigerian voters are headed to the polls Saturday amid concerns about violence in many parts of the country.