The crush happened at Kakamega Primary School, north-west of the capital Nairobi, on Monday afternoon.
Reports say children were leaving classes for home at about 17:00 local time (14:00 GMT) when the stampede took place.
Education minister George Magoha confirmed the 14 deaths to local media.
"The loss of a child is very painful. My condolences to parents who have lost their children," Mr Magoha told Citizen TV.
Nearly 40 other students were injured - some critically - and taken to hospital, reports say. Some of them were released after receiving treatment.
The cause of the stampede is not yet clear. But Kakamega police commander David Kabena told local media an investigation had been launched.
Some reports said the students had rushed down a narrow staircase at the end of the school day. The staircase is said to have collapsed.
The Daily Nation newspaper said some of the children fell from the third-floor of the building as they ran.
Videos posted to social media showed crowds of people gathered outside a hospital where children were being treated.
On Twitter, Kenya Red Cross said it was supporting emergency services after the "fatal stampede".
Kenya's education ministry offered condolences to the families and friends of those who had died.
Correspondents say the incident may raise questions about the safety of children in Kenya's schools.
Raila Odinga, Kenya's former prime minister, called for a swift investigation to "get to the bottom of this incident".
In September last year eight pupils died and 69 were injured when a classroom collapsed at a primary school in Nairobi.
Several days later, Kenya's education ministry closed St Catherine's Children Education Centre Bombolulu, near Nairobi, due to safety concerns.
"This is just a start and we are going to crack down on all schools in the country with poor structures," Mr Magoha said at the time.