Gender identity is one's personal experience of one's own gender. Gender identity can correlate with assigned sex at birth, or can differ from it completely. All societies have a set of gender categories that can serve as the basis of the formation of a person's social identity in relation to other members of society. In most societies, there is a basic division between gender attributes assigned to males and females, a gender binary to which most people adhere and which enforces conformance to ideals of masculinity and femininity in all aspects of sex and gender: biological sex, gender identity, and gender expression. In all societies, some individuals do not identify with some (or all) of the aspects of gender that are assigned to their biological sex; some of those individuals are transgender or genderqueer. Some societies have third gender categories.
Core gender identity is usually formed by age three. After age three, it is extremely difficult to change, and attempts to reassign it can result in gender dysphoria. Both biological and social factors have been suggested to influence its formation.
There are several theories about how and when gender identity forms, and studying the subject is difficult because children's lack of language requires researchers to make assumptions from indirect evidence. John Money suggested children might have awareness of, and attach some significance to gender, as early as 18 months to two years; Lawrence Kohlberg argues that gender identity does not form until age three. It is widely agreed that core gender identity is firmly formed by age three. At this point, children can make firm statements about their gender and tend to choose activities and toys which are considered appropriate for their gender (such as dolls and painting for girls, and tools and rough-housing for boys), although they do not yet fully understand the implications of gender. After age three, core gender identity is extremely difficult to change, and attempts to reassign it can result in gender dysphoria. Gender identity refinement extends into the fourth to sixth years of age, and continues into young adulthood.