Bench Tools Free browser-based calculators for the lab and for bioinformatics

ToolsSequence tools

Pairwise Sequence Alignment Online Tool (Needleman-Wunsch Global Alignment)

Global alignment of two sequences with alignment output, score, percent identity, and mismatch/gap statistics.

Needleman-Wunsch is the standard algorithm for global alignment, using dynamic programming to guarantee the optimal alignment under a given scoring scheme — not a heuristic approximation.

The algorithm rests on a single recurrence. Let H(i,j) be the optimal score for the first i residues of sequence a and the first j residues of sequence b:

H(i,j) = max{ H(i-1,j-1) + s(aᵢ,bⱼ),    align
              H(i-1,j)   + gap,          gap in b
              H(i,j-1)   + gap }         gap in a

Once the matrix is filled, trace back from the bottom-right corner to recover the alignment.

Global or local? This is the most common source of errors:

Scoring parameters change the result. The defaults (match +1, mismatch −1, gap −2) are adequate for a quick look. For formal analysis, use a tool with a substitution matrix (EDNAFULL for nucleotides, BLOSUM62 for proteins) and separate gap-open and gap-extend penalties — this tool uses a linear gap penalty, which can give substantially biased results for sequences containing long insertions or deletions.

Computation runs entirely in the browser; time and space are both O(mn), so sequence length is capped at 2000 bp.

FAQ

Which should I use — global or local alignment?

Use global alignment (this tool) when sequences are similar in length with high overall homology. Use local alignment (Smith-Waterman / BLAST) when they differ greatly in length or share homology only over part of their length. Comparing a short primer against a long template with global alignment will produce a result swamped by gaps.

Why does the identity percentage differ from other tools?

Identity can be calculated with two different denominators: total alignment length (including gaps) or the length of the shorter sequence. This tool uses total alignment length. Different scoring schemes also produce different alignments and therefore different identity values.

What is the maximum sequence length?

2000 bp. Dynamic programming is O(mn) in both time and space; longer sequences will freeze the browser.

Related tools

Codon Table Quick Reference (Standard Genetic Code): Bidirectional Codon–Amino Acid Lookup

All 64 codons of the standard genetic code — look up amino acids by codon or reverse-query codons by amino acid; accepts both DNA and RNA notation.

Amino Acid Properties Reference: Molecular Weight, Side-Chain pKa, Hydrophobicity, and Codon Count

Properties of all 20 standard amino acids: residue mass, side-chain pKa, Kyte-Doolittle hydrophobicity, and codon count. Searchable by code or name.

Restriction Enzyme Recognition Sequences Reference & Cut-Site Finder

Recognition sequences, cut sites, end types, and average spacing for 30 common restriction enzymes; paste any sequence to locate cut sites (linear or circular).

No ads, no tracking, no sign-up — and every formula here is checked against a known answer. Keeping it that way takes ongoing work. If it saved you time, buy me a coffee.
Buy me a coffee