Gender is generally thought of as a stable trait: we are born male or female and we stay that way as we grow from small children to adults.

It turns out that for young children, initial concepts about gender are quite flexible. In my own research, I’ve found that children don’t begin to notice and adopt gender-stereotyped behaviors (e.g., preferring colors like pink or blue) until the age of two or three. A few years later, their concept of gender becomes quite rigid, and although it becomes more relaxed by middle childhood, even adults have trouble going back to thinking about gender as something that’s flexible.

So, how do children come to understand gender? When do they begin to think about gender as a stable trait?

What is gender?

We often tend to think about gender as the biological differences between men and women.

It is true that the path to gender development begins at conception. Each cell in our body has 46 chromosomes. A father’s sperm and a mother’s egg each has only half – 23 each. At conception, the chromosomes of the sperm and the egg match up into 22 identical pairs, with the 23rd pair being the sex chromosome. In most cases, XX chromosomes will become female and XY chromosomes will become male.

But this isn’t always the case. Gender is what actually gets expressed – how we look, how we act and how we feel. While sex is determined by what is written into the chromosomes or what is dictated by our biology, known as genotype, it is the interaction between the genes (genotype) and the environment that determines gender.

Sex doesn’t necessarily map to gender perfectly, and the environment plays a role in determining the gender of each person.

Perhaps this shouldn’t be that surprising, given that the sex of many species of animals is determined entirely by environmental circumstances and not by their biology. For example, there are animals that don’t have sex chromosomes at all, and some species of coral reef fish can actually switch genders if their schools require it. Alligators, crocodiles, turtles and some lizards don’t have sex chromosomes either: their sex is simply determined by the temperature of their nest during incubation.

It’s true that most of the time, a person’s sex and gender are quite similar, but this doesn’t necessarily have to be the case. And of late, the lines between sex and gender are becoming more blurred as people are becoming more comfortable identifying as transgender – or with a gender that is not consistent with their sex. In fact, for some people, gender is nonbinary, and exists on a spectrum of masculinity and femininity.

Children’s early gender concepts

So it turns out that gender is more of a flexible state than most people think. And surprisingly, as children, we start out thinking more flexibly about gender than we end up.

Before the age of five, children don’t seem to think that gender has any permanence at all. A preschooler might ask his female teacher whether she was a boy or girl when she was little, or a little boy might say that he wants to grow up to be a mommy.

Research supports this early flexibility in children’s gender concepts. For example, in a well-known study, psychologist Sandra Bem showed preschool-aged children three photographs of a male and female toddler.

In the first photo, the toddler was naked; in the second the toddler was dressed in gender-typical clothing (e.g., a dress and pigtails for the girl, a collared shirt and holding a football for the boy); in the third photo, the toddler was dressed in stereotypical clothing of the opposite gender.

Bem then asked the children a variety of questions. First she asked them about the photo of the naked toddler and the photo of the toddler dressed in gender-typical clothing, asking children whether the toddler was a boy or a girl.

She then presented the children with the same toddler dressed in opposite-gendered clothing. She told them that the toddler was playing a silly dress-up game, and made sure that the first nude photo of the toddler was still visible for reference. She then asked the children whether the toddler in the third photograph was still a boy or a girl.

Most three- to five-year-olds thought that a boy who decided to dress up like a girl was now indeed a girl. It wasn’t until children understood that boys have penises and girls have vaginas that they also knew that changing your clothes doesn’t change your gender.

Developing gender identity

Further research suggests that children’s concept of gender develops gradually between the ages of three and five. After the age of five, most children believe that outward changes in clothing or hairstyle don’t constitute a change in gender.

Once children begin to think about gender as a stable trait, they also start to incorporate gender into their own identity.

Around that time, they become motivated to relate to other members of their group and seek out gender-related information, often becoming very strict about adhering to gender stereotypes. For example, children between the ages of three and five prefer to play with members of their own gender. And they also prefer to engage with gender-stereotyped toys and activities.

It isn’t until a few years later – when they are between seven and 10 years of age – that children become more relaxed about maintaining behaviors that are strictly male or female. It is around that age, for example, when both boys and girls might admit that they “like to play with trucks” or “like to play with dolls.”

Ahead of their time?

Recent media attention on transgender people has once again drawn our attention back to the fact that while our chromosomes determine our sex, they are not the only factors that affect our gender identity.

This is something that children seem to know early on, but that most discard as they begin to learn about basic anatomy and incorporate that information into their own gender identities.

We often think of children’s thinking as immature, but it may be that preschoolers are actually way ahead of their time.