This is the worst attack in a long-standing feud
Some 6,000 people from around Turbi village in north-eastern Kenya have gone to Marsabit, the nearest large town, a Kenyan Red Cross official said.
Two men were killed in apparent revenge attacks on Thursday, police said and more huts have been burnt in Turbi.
Security forces in armoured cars and helicopters are pursuing the raiders.
Machete attacks
Hundreds of armed men surrounded Turbi primary school and nearby houses and opened fire as children were making their way to school early on Tuesday.
The situation is very sad on the ground, everybody is mourning the dead
Former Kenyan foreign minister In pictures: Kenya massacre Raid survivors' tales Bonaya GodanaFormer Kenyan foreign minister
The BBC's Adam Mynott in Turbi says witnesses report that many of the children were hacked to death with machetes as they arrived at the school.
"Three [children] from strand eight were caught in the school compound when they were trying to rescue the young ones, to run out of the school. They were killed there," said head teacher Guay Sako.
Ten bandits are also said to have died in the violence.
Feuding clans
The raid on Turbi - populated by the Gabra clan - is blamed on the rival Borana, some of whom come from Ethiopia. The two groups have feuded over water and pasture in the semi-arid region.
Kenyans say the killers have fled north, towards Ethiopia, and they have stolen cattle, goats and camels.
In Marsabit 16 people are being treated in hospital, our correspondent in Turbi says.
Among those who fled the violence, one person said he left because his home had been destroyed and had no confidence in the security forces.
Confirming the deaths of two Borana men in Moyale near the Ethiopian border, the area's deputy police commander Hezbon Kadenge told the AFP news agency: "The tension here is very high, the two clans are completely at odds."
Cross-border raids for livestock are common in the area but correspondents say this is one of the most deadly such attacks in Kenya's history.
Presidential appeal
On Wednesday, President Mwai Kibaki appealed for calm.
Government spokesman Alfred Mutua said Kenya had started diplomatic channels to bring those responsible to justice.
This seven-year-old boy was air-lifted to Nairobi 560km away
But he hinted that the raiders would be caught before they reached the border, 200km away, with lots of livestock.
"They don't just disappear into thin air," he said.
Deputy provincial police officer Gerald Oluch told the BBC's Network Africa programme that some cattle stolen by them had been recovered.
"More than a 100 policemen are on the ground, and the army," he said, adding other units were on their way.
Kenyans living near a village where 76 people died in a massacre on Tuesday have fled their homes.
6,000 people from around Turbi village in north-eastern Kenya have gone to Marsabit, the nearest large town. 
Two men were killed in revenge attacks on Thursday, police said and more huts have been burnt in Turbi. 
Security forces in armoured cars and helicopters are pursuing the raiders.