Children may first learn about sharing when in pre-school, but a new study shows the behaviour doesn't take root until they are into the second grade.

Swiss and German researchers studied the behaviour of 229 Swiss children and found that while kids aged three to four showed no tendencies to think beyond their own needs, children aged seven to eight had developed a sense of fairness and understanding of inequality, which led them to share more often with other children.

In a finding that echoed a similar study with capuchin monkeys published Tuesday, the researchers also found the tendency to share was much more prevalent when the child knew the person they were sharing with.

Writing in the Thursday issue of the journal Nature, the researchers said they based their findings on three tests.

In the "sharing" test, the child chose between splitting two sweets between themselves and their companion, or having both sweets for themselves.

In a second "envy" test, children received one sweet either way, but could choose to give their companion either one or two sweets.

In the third test, designed to measure "prosocial" behaviour, children could either choose to receive one sweet while their companion received none, or choose to have each of them receive a sweet.

The results indicated three- to four-year-old kids care little for inequality or sharing, with less than 10 per cent opting for the egalitarian approach in the "sharing" test, and the choices closer to 50 per cent in the other two tests, suggesting what the other child received played little consideration into their decision making.

Among five- to six-year-old children, only 22 per cent chose to split the sweets evenly in the sharing game, and again this group showed little consideration for one option over the other in the other two tests.

For kids seven and eight, however, the results changed dramatically. In the sharing game, 45 per cent chose to split the sweets evenly, as did 78 per cent in the prosocial test and 80 per cent in the envy test.

The researchers also found the children were 15 to 20 per cent more likely to chose the egalitarian option if they knew their companion, suggesting a desire to share is shaped by a preference for members of one's own social group.

"These results indicate that human egalitarianism and parochialism have deep developmental roots," researchers wrote.