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. 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 includes expectations 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, genderqueer or non-binary. There are some societies that 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.