Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Pairwise Sequence Alignment Tool

Global or local alignment of two DNA or protein sequences, with identity and similarity.

Free preview, no sign-upIncluded in your pass Pro tool Pro pass: ₹179 / $5.99 for 30 days On this device: nothing is sent
+3 +1 more details No uploadWorks offline once opened Science

Free preview: the score, length, identity, similarity and gaps in full, with the first rows of the alignment (up to 10). Locked until you unlock it: download and copy.

Pro pass ₹179 for 30 days or ₹79 for 1 week, one‑time. Pro pass $5.99 for 30 days or $2.99 for 1 week, one‑time. How to unlock

Try before you buy.

  • Free preview: the score, length, identity, similarity and gaps in full, with the first rows of the alignment (up to 10).
  • Locked until you unlock it: download and copy.
  • Unlock: Pro pass, ₹179 for 30 days or ₹79 for 1 week, a one-time payment that never renews. Unlock: Pro pass, $5.99 for 30 days or $2.99 for 1 week, a one-time payment that never renews.

Ways to unlock shows how to get the full result.

See passes (opens in a new tab)

Printing this result is locked in the free preview.

Two sequences

Plain text or FASTA, up to 20,000 residues.
Plain text or FASTA, up to 20,000 residues.
Alignment
BLOSUM62 for most proteins; BLOSUM80 or PAM30 for close relatives, BLOSUM45 for distant ones.
A gap of n residues costs open + (n − 1) × extend.
End gaps
Short sequences align as you type.

Alignment

  • | identical
  • : similar (positive score)
  • . different
  • - gap

Paste two sequences, or load an example, and the alignment appears here.

Next steps Done. What next?

Start over

A Pro pass unlocks the full result. See passes

All science calculators

About the Pairwise Sequence Alignment Tool

Paste two DNA, RNA or protein sequences and get their optimal alignment: global (Needleman–Wunsch), end to end, for sequences related over their whole length, or local (Smith–Waterman), the best-matching region, for a domain inside a protein or a gene in a longer sequence. Gaps are scored the affine way, an opening penalty and a smaller one for each extra residue, and the alignment is found in linear memory (the Myers–Miller method) in a background worker, so sequences up to 20,000 residues (and up to 100 million positions to compare) fit in the browser’s memory, on a phone too.

Proteins are scored with BLOSUM62 or another BLOSUM or PAM matrix, DNA with NUC.4.4, which knows the IUPAC codes, or with your own match and mismatch scores. You get the score, the length, the identity, the similarity and the gaps, counted as EMBOSS needle and water count them, and a colour-coded alignment with residue numbers. With a Pro pass, copy the alignment or download it as text or as aligned FASTA, or unlock this one result. Without a pass the free preview shows the score, length, identity, similarity and gaps in full, with the first rows of the alignment (up to 10).

How to use it

  1. Paste the two sequences, plain or FASTA (the first word of a header becomes the name), or load an example.
  2. Choose global or local alignment. In a global alignment, end gaps cost nothing unless you tick “Penalise gaps at the ends too”.
  3. Keep the usual scoring (BLOSUM62 for proteins, NUC.4.4 for DNA) or choose another matrix or match and mismatch scores, and the gap penalties.
  4. Short sequences align as you type; press Align for long ones and watch the progress, or cancel it. Reset clears both sequences and restores the usual scoring.
  5. Read the statistics and the alignment. Copy it or download the text and FASTA files with a Pro pass, or after unlocking this result.

Examples

Human haemoglobin α and β (EMBOSS needle’s example)
Input
HBA_HUMAN (142 aa) and HBB_HUMAN (147 aa), global, BLOSUM62, gap 10, extension 0.5
Result
Length 149; identity 65/149 (43.6%); similarity 90/149 (60.4%); gaps 9/149 (6.0%); score 292.5, as EMBOSS reports
Needleman–Wunsch by hand
Input
GATTACA and GCATGCU, match +1, mismatch −1, every gap position −1 (gap 1, extension 1), end gaps penalised
Result
Score 0
Smith–Waterman by hand
Input
TGTTACGG and GGTTGACTA, match +3, mismatch −3, every gap position −2
Result
Score 13: GTT-AC aligned with GTTGAC

Common uses

  • Comparing a gene or a protein between two species
  • Checking a sequencing read or a clone against its reference
  • Finding a conserved domain inside two longer proteins with a local alignment
  • Working out percent identity and similarity for a report
  • Learning how dynamic-programming alignment works, with the textbook examples

How the alignment is scored

  • Each aligned pair scores its value in the matrix: in BLOSUM62, a tryptophan with a tryptophan scores 11, an alanine with a glutamate −1.
  • A gap of n residues costs open + (n − 1) × extend, with 10 and 0.5 as in EMBOSS.
  • Global alignments include every residue of both sequences; by default the gap that opens the alignment and the one that closes it cost nothing, which suits a short sequence aligned into a longer one.
  • Local alignments keep only the highest-scoring region; an alignment of unrelated sequences can be empty.
  • The score is the total; identity counts identical pairs, similarity pairs with a positive score, and gaps the gap positions, each over the length of the alignment including gaps. The markup line shows | for identical, : for similar and . for other pairs.

Choosing a matrix

BLOSUM matrices were built from blocks of aligned protein segments: BLOSUM62 from blocks clustered at 62% identity, the usual choice. A higher number (BLOSUM80, BLOSUM90) suits closely related sequences, a lower one (BLOSUM45) distant ones. PAM matrices are numbered the other way: PAM30 for close relatives, PAM250 for distant ones. For DNA, NUC.4.4 scores a match +5 and a mismatch −4 and gives partial scores to IUPAC codes such as R or N; match and mismatch scores of your own are the alternative.

How it is computed

The alignment uses Gotoh’s three-state recurrences for affine gaps and Myers and Miller’s divide-and-conquer, which needs memory in proportion to the length of the sequences rather than to their product, so 10,000 × 10,000 residues fit in a few hundred kilobytes. A global alignment with unpenalised end gaps first finds where the best alignment ends and starts, then aligns that stretch; a local one does the same around its best-scoring region. Its unit tests check it against a full-matrix aligner on hundreds of random pairs and reproduce the score and statistics of EMBOSS needle’s documented example.

Sources

  • Needleman S.B. and Wunsch C.D., Journal of Molecular Biology 48:443 (global alignment); Smith T.F. and Waterman M.S., Journal of Molecular Biology 147:195 (local alignment); Gotoh O., Journal of Molecular Biology 162:705 (affine gaps); Myers E.W. and Miller W., CABIOS 4:11 (linear space).
  • Henikoff S. and Henikoff J.G., PNAS 89:10915 (BLOSUM); the matrices as published by NCBI.
  • EMBOSS needle: the gap scoring, the statistics and the example.

Limitations

  • Two sequences at a time: for many, use a multiple sequence alignment program.
  • Up to 20,000 residues each and 100 million positions to compare (10,000 × 10,000); long alignments take seconds on a computer and longer on a phone.
  • When several alignments have the same best score, one of them is shown; the score and the statistics may differ slightly from another program’s choice.
  • No statistical significance (E-value) is given: a high score of short or low-complexity sequences can arise by chance.
  • Selenocysteine (U), pyrrolysine (O) and J in proteins are scored as X.

Privacy

On this device: nothing is sent

Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.

Frequently asked questions

What do I get without a pass?

Without a pass, Pairwise Sequence Alignment Tool shows the score, length, identity, similarity and gaps in full, with the first rows of the alignment (up to 10). Until you unlock it, the result can’t be downloaded or copied. A Pro, Premium or Ultimate pass, a one-time payment that never renews, unlocks the full result. The pricing page lists the passes and their prices.

Should I use a global or a local alignment?

Global when the two sequences are related from end to end (two versions of the same protein or gene); local when only part of them is: a shared domain, a gene inside a longer sequence, or a read inside a reference.

How is percent identity calculated?

Identical pairs divided by the length of the alignment, gap positions included, as EMBOSS does. For haemoglobin α and β that is 65 identical positions in an alignment of 149: 43.6%.

What is the difference between identity and similarity?

Identity counts positions with the same residue; similarity also counts different residues that the matrix scores positively, such as isoleucine and leucine in BLOSUM62 (+2).

Why are end gaps not penalised by default?

When one sequence is shorter, or the two overlap only in part, the overhanging ends are not evidence against the alignment. EMBOSS needle leaves them unpenalised by default; tick “Penalise gaps at the ends too” for a strict end-to-end alignment.

Which gap penalties should I use?

Start with 10 to open and 0.5 to extend for BLOSUM62, as EMBOSS does. A higher opening penalty gives fewer, longer gaps; a higher extension penalty, shorter gaps.

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.