InfyCalculator
🧬

Sequence Identity Calculator: Percent Identity and Similarity of Two Sequences

Percent identity and similarity of two DNA, RNA or protein sequences: paste an existing alignment or let the tool align them (Needleman–Wunsch, BLOSUM62), with identity over the alignment, ungapped columns, the shorter, mean or longer sequence, gaps, alignment score, p-distance with Jukes–Cantor, Kimura or Poisson correction, transitions and transversions, and the alignment itself.

Sequence 1
Sequence 2
Type
Alignment
Main identity measure
Protein similarity counts
Gap opening penalty
Gap extension penalty
Loading calculator…

How it works

identity = identical columns ÷ D, where D = alignment length (gaps count), ungapped columns, shorter, mean or longer sequence length; similarity = (identical + conservative) ÷ alignment length; p = mismatches ÷ ungapped columns; Jukes–Cantor d = −¾ ln(1 − 4p/3); Kimura d = −½ ln(1 − 2P − Q) − ¼ ln(1 − 2Q); Poisson d = −ln(1 − p)

Percent identity is the share of alignment columns in which both sequences have the same residue, but the result depends on the denominator, so a figure is only meaningful when you say which one you used (May 2004; Raghava and Barton 2006). Dividing by the full alignment length counts every gap against identity; dividing by ungapped columns ignores gaps, which is close to what BLAST reports for the aligned region; dividing by the shorter, mean or longer sequence describes how much of whole sequences match. The calculator gives all five and lets you choose the headline one. You can paste sequences that are already aligned (with “-” for gaps, from BLAST, Clustal, MUSCLE or a FASTA alignment), or plain sequences, which are aligned here with a global Needleman–Wunsch alignment with affine gap penalties, free end gaps and BLOSUM62 for proteins (match +5, mismatch −4 for DNA), the same defaults as EMBOSS Needle. Very long pairs should be aligned with a dedicated tool first. Protein similarity counts pairs with a positive BLOSUM62 score, as EMBOSS does, or, if you prefer, residues in the same chemical group. For DNA the transition/transversion count and ratio (often about 2 in real genes) check that an alignment is plausible, and the p-distance is corrected for multiple hits with the Jukes–Cantor and Kimura two-parameter models; for proteins a Poisson correction is used. Identity alone does not prove homology: short alignments and low-complexity regions can look similar by chance.

Worked example

The default pair is already aligned: 34 columns, with one gap in sequence 1 at position 23 (33 and 34 residues). 33 columns are identical, 0 mismatched and 1 is a gap, so identity over the alignment is 33 ÷ 34 = 97.1%, over ungapped columns 33 ÷ 33 = 100% and over the shorter sequence 33 ÷ 33 = 100%; over the mean length (33.5) it is 98.5% and over the longer one 97.1%. The gap is internal, so it costs one opening penalty: the BLOSUM62 score of the 33 matches is 160, minus 10 = 150.0. With no mismatches the p-distance and Poisson distance are both 0.

Sources: Raghava & Barton (2006), Quantification of the variation in percentage identity for protein sequence alignments, BMC Bioinformatics · Biostrings pid(): PID1–PID4 definitions (after May 2004) · Sequence Manipulation Suite – Ident and Sim · Biostars: how EMBOSS Needle reports identity and similarity

Frequently asked questions

Do I need to align the sequences first?

No. If you paste two unaligned sequences of different lengths, they are aligned here with a global Needleman–Wunsch alignment (BLOSUM62, gap open 10, extend 0.5, end gaps free). If they are already aligned, include the “-” gap characters and choose “Already aligned” so nothing is moved.

Which percent identity should I report?

State the denominator. Identity over the alignment length counts gaps; identity over ungapped columns is closest to BLAST’s figure for the aligned region; identity over the shorter or longer sequence describes whole sequences. For one pair these can differ by tens of percentage points.

What identity implies homology?

For proteins aligned over 100 or more residues, above about 30% identity is usually homologous, 20–30% is the “twilight zone”, and below 20% similar alignments occur by chance. DNA needs much higher identity because there are only four bases.

What is the difference between identity and similarity?

Identity counts only positions with exactly the same residue. Similarity also counts conservative substitutions, such as leucine for isoleucine or aspartate for glutamate, so it is always equal to or higher than identity.

Why does my result differ from BLAST or EMBOSS?

Different denominators, gap penalties or alignment type (local versus global) change the alignment and the count. BLAST reports a local alignment of the best-matching region only; EMBOSS Needle reports a global alignment over the full length including gaps.

What are the Jukes–Cantor and Kimura distances?

They correct the observed proportion of differing sites for multiple substitutions at the same site. Jukes–Cantor assumes all changes are equally likely; Kimura’s two-parameter model allows transitions and transversions to occur at different rates. Both become undefined (saturated) as sequences approach random similarity.

Related calculators

This calculator is for educational purposes. Double-check important results before acting on them.