Selection Coefficient Calculator

Calculate selection coefficients and model allele frequency changes under selection.

Input Data

h=0: recessive, h=0.5: additive, h=1: dominant

Selection Coefficient

s = 0.1500
15.00% fitness reduction
Against mutant (deleterious)

Genotype Fitnesses

AA
1.0000
Aa
0.9250
aa
0.8500

Frequency Dynamics

Initial Frequency0.1
After 100 gens0.9969

Time Estimates

Time to FixationN/A gens
Time to Loss15 gens

What Is a Selection Coefficient?

The selection coefficient, written as s, measures how strongly natural selection acts against a genotype relative to the most-fit reference genotype in a population. It is one of the central parameters of population genetics and evolutionary biology, quantifying the relative fitness disadvantage of an allele or genotype in a single number that ranges from -1 to 1. A value of s = 0 means the variant is selectively neutral; a positive s means the mutant suffers a fitness cost (deleterious), and a negative s means the mutant enjoys a fitness advantage (beneficial).

This selection coefficient calculator converts raw fitness or survival data into s, then propagates an allele's frequency forward through many generations so you can watch selection sweep, purge, or balance a variant. Researchers in evolutionary biology, conservation genetics, and quantitative genetics use the selection coefficient to compare the strength of selection across loci, predict how fast an adaptive mutation spreads, and estimate how long a harmful allele persists before it is removed. Because fitness is always measured relative to a reference, the wildtype is conventionally assigned a fitness of 1, and every other genotype is scaled against it.

In Wright-Fisher and Hardy-Weinberg frameworks, the selection coefficient links directly to the relative fitnesses of the three diploid genotypes at a single locus: the homozygous reference (AA), the heterozygote (Aa), and the homozygous variant (aa). Whether you start from laboratory survival percentages or from estimated fitness values, the calculator returns the same evolutionary currency, s, and the genotype fitness schedule that drives the dynamics.

Selection Coefficient Formula and Genotype Fitnesses

The calculator derives the selection coefficient from the ratio of mutant fitness to wildtype fitness. In fitness mode, you supply absolute or relative fitness values; in survival mode, you supply survival percentages. Both reduce to the same definition of s:

Fitness mode: s = 1 − (wmutant / wwildtype)

Survival mode: s = 1 − (survivalmutant / survivalwildtype)

Once s is known, the calculator builds the relative fitnesses of the three genotypes using the dominance coefficient h, which controls how the heterozygote's fitness sits between the two homozygotes. In survival mode the schedule is the textbook form wAA = 1, wAa = 1 − h·s, waa = 1 − s. In fitness mode the wildtype value is kept on its original scale: wAA = wwildtype, wAa = wwildtype·(1 − h·s), and waa = wmutant.

The dominance coefficient ranges from h = 0 (the variant is fully recessive, so heterozygotes carry no fitness cost) through h = 0.5 (additive or codominant, the heterozygote is exactly intermediate) to h = 1 (the variant is fully dominant, so one copy already carries the full effect). This single locus, biallelic model is the workhorse of deterministic selection theory and underlies every projection the calculator makes.

Selection Coefficient

s = 1 - (w_mutant / w_wildtype)

Where:

  • s= Selection coefficient (ranges from -1 to 1; positive = deleterious, negative = beneficial)
  • w_mutant= Fitness or survival of the mutant (homozygous variant) genotype
  • w_wildtype= Fitness or survival of the wildtype (reference) genotype
  • h= Dominance coefficient: w_Aa = w_wildtype × (1 − h·s)

How Allele Frequency Changes Each Generation

Knowing s tells you the direction of selection, but the allele frequency trajectory tells you how fast and how far it goes. The calculator iterates the standard deterministic selection recursion for a diploid population in Hardy-Weinberg proportions. Let p be the frequency of the reference allele A and q = 1 − p the frequency of the variant allele a. Each generation the population's mean fitness is the weighted average of the three genotype fitnesses:

w̄ = p²·wAA + 2pq·wAa + q²·waa

The frequency of A in the next generation is the share of A alleles that survive and reproduce, normalized by mean fitness:

p' = (p²·wAA + pq·wAa) / w̄

The calculator applies this recursion for the number of generations you enter (capped internally at 500 steps for the displayed trajectory) and reports the final allele frequency. Because selection always increases mean fitness in this constant-fitness model, the trajectory marches monotonically toward fixation of the fitter allele unless heterozygotes are favored. When you set h outside the 0-to-1 interval to model overdominance or underdominance, the calculator also reports the internal equilibrium frequency where the two opposing selection pressures balance, giving a stable polymorphism in the overdominant case.

Time to Fixation and Time to Loss

Beyond the deterministic sweep, the calculator reports two diffusion-style timescales that summarize the long-run fate of the variant in a finite population. These estimates assume an effective population size of Ne = 1000, a common reference value for illustrating selection strength.

For a beneficial variant (s < 0, meaning the mutant is fitter than wildtype), the calculator estimates the time to fixation as roughly (2 / |s|) · ln(2 Ne) generations. Stronger selection (larger |s|) drives the favored allele to fixation faster, while weaker selection stretches the sweep over many more generations.

For a deleterious variant (s > 0), the calculator estimates the time to loss as roughly (1 / s) · ln(1 / p0) generations, where p0 is the initial frequency of the variant. A harmful allele starting at higher frequency takes longer to purge, and weaker selection again prolongs its persistence. These are order-of-magnitude approximations, not exact stochastic expectations, but they are extremely useful for intuiting how the strength of natural selection translates into evolutionary time.

Sign of s Meaning Reported timescale
s > 0 Mutant deleterious Time to loss = (1/s)·ln(1/p₀)
s < 0 Mutant beneficial Time to fixation = (2/|s|)·ln(2Nₑ)
s = 0 Neutral N/A (drift dominates)

Interpreting Your Selection Coefficient

The magnitude of s tells you whether selection is strong or subtle. As a rough guide used widely in evolutionary biology and population genetics, an s on the order of 0.1 or greater is considered strong selection that can change allele frequencies noticeably within a handful of generations. A value near 0.01 represents moderate selection, and values below about 0.001 are weak enough that genetic drift can overwhelm selection in small populations, especially when Ne · s is less than 1.

The dominance coefficient profoundly affects how visible selection is. Fully recessive deleterious alleles (h = 0) hide from selection in heterozygotes, so they persist far longer and are purged slowly because selection only "sees" the rare homozygotes. Dominant variants (h = 1) are exposed to selection in every carrier and respond quickly. This is why recessive disease alleles linger in human populations at low frequency while strongly dominant deleterious alleles are rare. When you report a final frequency from this selection coefficient calculator, always note the dominance assumption alongside s, because the same s produces very different trajectories depending on h.

Finally, remember that this model is deterministic: it ignores mutation, migration, and the random sampling of genetic drift. In real finite populations, a beneficial allele can still be lost by chance early in its sweep, and a slightly deleterious allele can drift to fixation. Use the calculator's projections as expectations under strong, consistent selection rather than guarantees for any single population.

Worked Examples

Deleterious mutant from fitness values (default inputs)

Problem:

A wildtype genotype has relative fitness 1.0 and a mutant homozygote has fitness 0.85, with additive dominance (h = 0.5). What is the selection coefficient and the genotype fitness schedule?

Solution Steps:

  1. 1Apply the fitness-mode formula: s = 1 − (w_mutant / w_wildtype) = 1 − (0.85 / 1.0) = 0.15.
  2. 2Because s > 0, the mutant is deleterious (selection acts against it).
  3. 3Heterozygote fitness: w_Aa = w_wildtype × (1 − h·s) = 1 × (1 − 0.5 × 0.15) = 1 − 0.075 = 0.925.
  4. 4Genotype schedule: w_AA = 1.0000, w_Aa = 0.9250, w_aa = 0.8500.

Result:

s = 0.1500 (a 15% fitness reduction), classified as 'Against mutant (deleterious)'.

Time to loss of a deleterious allele

Problem:

Using s = 0.15 from the previous example, with the variant starting at frequency p₀ = 0.1, estimate how many generations until the deleterious allele is effectively lost.

Solution Steps:

  1. 1Use the deleterious timescale: Time to loss = (1 / s) · ln(1 / p₀).
  2. 2Substitute: (1 / 0.15) · ln(1 / 0.1) = 6.667 × ln(10).
  3. 3Compute the logarithm: ln(10) = 2.3026, so 6.667 × 2.3026 = 15.35.
  4. 4Round to the nearest generation.

Result:

Time to loss ≈ 15 generations.

Beneficial mutant and time to fixation

Problem:

A mutant has relative fitness 1.2 against a wildtype fitness of 1.0. Find the selection coefficient and estimate the time to fixation (Ne = 1000).

Solution Steps:

  1. 1Apply the formula: s = 1 − (1.2 / 1.0) = −0.2, so the mutant is beneficial (s < 0).
  2. 2Use the beneficial timescale: Time to fixation = (2 / |s|) · ln(2·Ne).
  3. 3Substitute: (2 / 0.2) · ln(2 × 1000) = 10 × ln(2000) = 10 × 7.6009.
  4. 4Compute: 10 × 7.6009 = 76.01, then round.

Result:

s = −0.2000 (beneficial); time to fixation ≈ 76 generations.

Selection coefficient from survival rates

Problem:

In a survival experiment, 100% of wildtype individuals survive a stressor while only 60% of mutant individuals survive. Compute s and the genotype fitnesses with h = 0.5.

Solution Steps:

  1. 1Survival-mode formula: s = 1 − (survival_mutant / survival_wildtype) = 1 − (60 / 100) = 0.40.
  2. 2Reference schedule: w_AA = 1, w_aa = 1 − s = 1 − 0.40 = 0.60.
  3. 3Heterozygote: w_Aa = 1 − h·s = 1 − 0.5 × 0.40 = 1 − 0.20 = 0.80.
  4. 4Classify the sign: s > 0, so selection acts against the mutant.

Result:

s = 0.4000 (strong selection); w_AA = 1.0000, w_Aa = 0.8000, w_aa = 0.6000.

Tips & Best Practices

  • Always assign the most-fit genotype a fitness of 1 so the selection coefficient is measured on a relative scale.
  • Report the dominance coefficient h alongside s, because the same s gives different trajectories at h = 0, 0.5, and 1.
  • Use survival mode when your raw data are survival or viability percentages from an experiment.
  • Remember that positive s means deleterious (selected against) and negative s means beneficial in this calculator's convention.
  • Check whether Ne·s is greater than 1; if not, genetic drift may overwhelm weak selection in a small population.
  • Recessive deleterious alleles (h near 0) persist far longer than dominant ones, so expect slow purging at low h.
  • Increase the number of generations to see whether a slow sweep eventually reaches fixation or loss.
  • Set h outside the 0-to-1 range to explore overdominance, which can hold a stable polymorphism at the equilibrium frequency.

Frequently Asked Questions

The selection coefficient measures the relative fitness disadvantage of a genotype compared with the fittest reference genotype, scaled so the reference has fitness 1. A positive s means the variant is deleterious and selection removes it, while a negative s means the variant is beneficial and selection favors it. An s of 0 indicates a selectively neutral variant whose fate is governed by genetic drift rather than selection.
Both modes compute s = 1 − (mutant value / wildtype value), but they differ in the inputs. Fitness mode takes relative or absolute fitness values directly and keeps the wildtype on its own scale, while survival mode takes survival percentages and normalizes the reference genotype to a fitness of 1. They give the same selection coefficient whenever the underlying ratios are identical.
The dominance coefficient sets the heterozygote fitness through w_Aa = w_wildtype × (1 − h·s), where h = 0 is fully recessive, h = 0.5 is additive, and h = 1 is fully dominant. A recessive deleterious variant (low h) hides in heterozygotes and is purged slowly, whereas a dominant variant (high h) is fully exposed to selection and responds quickly. The same s therefore produces very different allele frequency trajectories depending on h.
Because the calculator defines s relative to the wildtype reference using s = 1 − (mutant/wildtype), a mutant fitter than wildtype produces a value greater than 1 inside the parentheses, making s negative. The calculator labels negative s as 'For mutant (beneficial)' and switches to the time-to-fixation estimate. This is just a sign convention; the magnitude |s| still measures the strength of selection.
For a beneficial allele the calculator estimates time to fixation as about (2/|s|)·ln(2Ne) generations, and for a deleterious allele it estimates time to loss as about (1/s)·ln(1/p₀) generations, using an assumed effective population size of Ne = 1000. These are diffusion-style approximations meant to convey order of magnitude, not exact stochastic expectations. Stronger selection always shortens these timescales.
No. The frequency trajectory uses a deterministic constant-fitness recursion in Hardy-Weinberg proportions and ignores random drift, recurrent mutation, and gene flow. In real finite populations a beneficial allele can still be lost by chance and a slightly deleterious allele can drift to fixation, so treat the projections as expectations under strong, consistent selection.

Sources & References

Last updated: 2026-06-05

💡

Help us improve!

How would you rate the Selection Coefficient Calculator?

<>

Editorial Note

MyCalcBuddy Editorial Team

This page is maintained as an educational calculator reference.

Source

Formula Source: Standard Mathematical References

by Various

UpdatedLast reviewed: May 2026
CheckedFormula checks are based on standard references and internal QA review.

Privacy choices

MyCalcBuddy uses necessary storage for the site to work. Optional analytics, notifications, and future advertising features stay off unless you allow them.