Codon Adaptation Index Calculator

The Codon Adaptation Index quantifies how strongly a gene's codon usage matches the codons favoured by highly expressed genes in the same organism, a common proxy for expression potential and a key metric in gene synthesis and optimisation. CAI is the geometric mean of the relative adaptiveness values of every codon in the coding sequence. Because the reference table of w values is organism-specific, you supply the per-codon values or their log sum, and this calculator performs the exact geometric-mean computation for you.

0.00
0.00
0.00
0.00

CAI formula

CAI = (product of w_i for i = 1..L)^(1/L)
Equivalently CAI = exp( (1/L) * sum of ln(w_i) )
Mean ln(w) = sum of ln(w) / L
CAI percent = 100 * CAI

Each w is a codon's relative adaptiveness, its reference frequency divided by the most frequent synonymous codon. The geometric mean keeps CAI between 0 and 1. Supply the log sum from your organism's reference table.

Interpreting CAI

  • CAI ranges from 0 to 1; higher values mean stronger use of preferred codons.
  • Build the w table from a reference set of highly expressed genes for the target organism.
  • Exclude start, stop, and single-codon amino acids (Met, Trp) from the count, as is conventional.
  • CAI correlates with, but does not guarantee, high expression; other factors matter too.
  • The inspected-w field lets you check the log contribution of an individual codon.

Codon Adaptation Index: frequently asked questions

What is the Codon Adaptation Index?

The Codon Adaptation Index (CAI) measures how closely the codon usage of a gene matches the preferred codon usage of a reference set of highly expressed genes. It is the geometric mean of the relative adaptiveness (w) values of all codons in the gene. CAI ranges from 0 to 1; values near 1 indicate strong bias toward the most-used codons, which often correlates with higher expression.

How is CAI calculated?

CAI is the geometric mean of the per-codon relative adaptiveness values: CAI = (product of w_i)^(1/L), equivalently exp of the average of the natural logs of w. Here L is the number of codons scored (start and stop codons and single-codon amino acids are usually excluded) and each w is that codon's frequency relative to the most frequent synonymous codon in the reference set.

What is relative adaptiveness (w)?

For each codon, w is its usage frequency in the reference set divided by the frequency of the most-used synonymous codon for that amino acid. The most-preferred codon for each amino acid therefore has w = 1, and rarer synonyms have w less than 1. The reference set is typically a group of highly expressed genes from the organism of interest.

Why use the geometric mean instead of the arithmetic mean?

CAI uses the geometric mean because relative adaptiveness values are multiplicative ratios. The geometric mean is the natural average for ratios and prevents a single very small w from dominating less than it would in a product, while still penalising rare codons more than an arithmetic mean would. It also keeps CAI bounded between 0 and 1.

What inputs does this calculator need?

Enter the number of codons scored and the sum of the natural logarithms of their relative adaptiveness values, or use the per-codon helper to combine several w values. CAI = exp(sum of ln w divided by number of codons). Because the w table is organism-specific, you supply the values; this tool performs the deterministic geometric-mean computation.

Official sources

Reviewed by the CalculatorHub team, edited by James Graham, 17 June 2026. See our methodology.