A fitness function quantifies the optimality of a solution (that is, a chromosome) in a genetic algorithm. An ideal fitness function correlates closely with the algorithm's goal and yet may be computed quickly.

A fitness function is sometimes referred to as an objective function in the context of genetic algorithms.