Heritability refers to the proportion of phenotypic variation among a set of individuals that can be directly attributed to genotypic variation. It is often expressed as a percentage where, for example, a heritability of 20% denotes that 20% of the phenotypic variation among a population is caused by genetic differences. It is not a measure of how much a given trait is caused by genes. It refers only to the how much a certain level of trait variation can be attributed to genetics. Because heritability is a measure of variance, it can only be applied at the level of a population and not at the level of an individual.

For example, if all the individuals of a population exhibit some trait that is known to be genetically determined (e.g. white skin among an Eskimo population) then the heritability of that trait (in that population) is 0%, since there is no phenotypic variance to analyse. Even if some of those eskimos applied fake tan, the heritability would remain fixed at 0% since it is known that any variance in the skin colour phenotype is environmentally and not genetically determined (i.e. 0% of the phenotypic variance is attributable to genotypic variance). Conversely, in a population of mixed races, such as an inner city urban population where white, black and asian people might mix (supposing that fake tan or any skin colour-changing product was prohibited) the heritability would be 100% (since this time 100% of the phenotypic variance is known to be directly attributable to genotype).

Mathematically, heritability can be expressed by the following formula, where H denotes heritability, var denotes variance, and G and P denote genotype and phenotype, respectively.

H^2 = frac{Var(G)}{Var(P)}
H^2 = frac{Var(G)}{Var(P)}

The formula is derived from:

Phenotype (P) = Genotype (G) + Environment (E).

Considering variances (Var), this becomes:

Var(P) = Var(G) + Var(E) + 2 Cov(G,E).

In planned experiments, we can often take Cov(G,E) = 0. Thus, heritability is defined simply using the above formula.

The parameter H2 factors in all genetic inputs: including allelic variation, varying degrees of dominance, epistasis, genomic imprinting, direct maternal or paternal effects on the genome (such as maternal-effect genes), and other genetically-determined factors. Only the variable P in this formula can be reliably estimated from direct observation. Var(G) and Var(E) typically require more sophisticated statistical methods. These methods give better estimates when they come from closely related individuals, such as siblings, compared with distantly related individuals. The standard error for heritability estimates is typically poor, though it can be reduced when the dataset is large enough.