Natural Selection Rate Calculator

Calculate selection coefficient from allele frequency change over generations. Quantify how fast natural selection drives allele frequency change using the log-odds method.

🧬 Evolution📐 s = log-odds(p1/q1) - log-odds(p0/q0) / generations🧬 Biology
Initial allele frequency p0
Final frequency p1
Number of generations
Please enter valid values.

Formula & Reference

VariableSymbolFormulaUnits
Natural Selection Rate Calculator—s = log-odds(p1/q1) - log-odds(p0/q0) / generationsper generation

Step-by-Step Examples

Example 1
Industrial Melanism

Dark moth allele: p0=0.01 to p1=0.95 in 50 generations.

  • s = [log(0.95/0.05)-log(0.01/0.99)]/50 = 0.151
  • Strong directional selection
  • ~7 generations to double in frequency
✓ s = 0.15 — strong positive selection
Example 2
Drug Resistance

Resistance allele from p0=0.001 to p1=0.5 in 50 bacterial generations.

  • s ≈ 0.12 per generation
  • Rapid spread under antibiotic pressure
  • ~6 generations to double
✓ s ≈ 0.12, resistance spreads fast
Example 3
Weak Selection

Allele from 0.20 to 0.18 in 10 generations.

  • s ≈ -0.012 (weakly deleterious)
  • Takes 100+ gen to be eliminated
  • Drift may dominate at small Ne
✓ s ≈ -0.012, weak negative selection

Real-World Applications

Common Mistakes to Avoid

⚠️
Ignoring drift effects

Small Ne: drift matters as much as selection. |s| must >> 1/(2Ne) to overcome drift.

⚠️
Assuming constant environment

s changes with environment; historical estimates may not predict future.

⚠️
Not accounting for dominance

Selection acts on phenotype; dominance modifies effective s for recessives.

Frequently Asked Questions

What is selection coefficient? ▾
s = relative fitness difference between genotypes. s=0.1 means 10% more offspring than average.
What is strong vs weak selection? ▾
Strong: s > 0.01. Weak: s < 0.001. Drift dominates when |s| < 1/(2Ne).
How fast does selection act? ▾
With s=0.1, p goes from 0.01 to 0.50 in ~130 generations.
What is balanced selection? ▾
Heterozygote advantage maintains both alleles (e.g. sickle cell). No allele eliminated.
Can selection be detected from sequence data? ▾
Yes. FST outlier tests, Tajima's D, and dN/dS ratios detect selection signatures.

Related Biology Calculators