# What is the reverse complement?

Gives the reverse complement of a DNA or RNA sequence, read 5′ to 3′, with the complement and the reverse, for the bases A, C, G, T or U and the IUPAC codes for mixed bases.

- Page: https://www.acalculator.org/biology/reverse-complement-calculator
- JSON spec: https://www.acalculator.org/biology/reverse-complement-calculator.json
- Version: 3b27790bd282

## Default answer

Example with the default inputs (Sequence (5′ to 3′) ATGCGTACGTTAGC): The reverse complement (5′ to 3′) is GCTAACGTACGCAT.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| seq | Sequence (5′ to 3′) | DNA or RNA bases A, C, G, T or U, and IUPAC codes such as R, Y and N. Spaces, line breaks, numbers and a FASTA header line are ignored. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| revcomp | Reverse complement (5′ to 3′) | The partner strand read 5′ to 3′: the complement in reverse order. |
| complement | Complement (3′ to 5′) | The partner of each base, lined up under the sequence typed. |
| reverse | Reverse (3′ to 5′) | The sequence typed, in reverse order, with no base changed. |
| length | Length | The number of bases (symbols) in the sequence. |
| kind | Read as | DNA (A pairs with T) or RNA (A pairs with U, when the sequence has a U). |

## Method

Complement each base (A–T, or A–U in RNA; G–C; R–Y; K–M; B–V; D–H; S, W and N pair with themselves), then reverse the order.

## Assumptions

- The sequence is written 5′ to 3′, as is usual; the reverse complement is the partner strand, also written 5′ to 3′.
- A sequence with a U is read as RNA, and its complement uses U; a sequence may not have both T and U.
- Upper and lower case are kept as typed.

## Worked examples

1. seq = ATGCGTACGTTAGC gives revcomp = GCTAACGTACGCAT, complement = TACGCATGCAATCG, reverse = CGATTGCATGCGTA, length = 14, kind = DNA. Source: OpenStax, Biology 2e, §14.2 DNA Structure and Sequencing (A pairs with T and G with C; the two strands are antiparallel), https://openstax.org/books/biology-2e/pages/14-2-dna-structure-and-sequencing (retrieved 2026-10-18).
2. seq = AUGGCUAAC gives revcomp = GUUAGCCAU, complement = UACCGAUUG, kind = RNA. Source: NC-IUB, Nomenclature for Incompletely Specified Bases in Nucleic Acid Sequences, Recommendations 1984 (Table 1: R = A or G, Y = C or T, K = G or T, M = A or C, S = G or C, W = A or T, B, D, H, V, N; Table 2 complements; sequences run 5′ to 3′; T and U are synonyms), https://iubmb.qmul.ac.uk/misc/naseq.html (retrieved 2026-10-18); OpenStax, Biology 2e, §14.2 DNA Structure and Sequencing (A pairs with T and G with C; the two strands are antiparallel), https://openstax.org/books/biology-2e/pages/14-2-dna-structure-and-sequencing (retrieved 2026-10-18).
3. seq = ACGTRYKMSWBDHVN gives revcomp = NBDHVWSKMRYACGT, complement = TGCAYRMKSWVHDBN. Source: NC-IUB, Nomenclature for Incompletely Specified Bases in Nucleic Acid Sequences, Recommendations 1984 (Table 1: R = A or G, Y = C or T, K = G or T, M = A or C, S = G or C, W = A or T, B, D, H, V, N; Table 2 complements; sequences run 5′ to 3′; T and U are synonyms), https://iubmb.qmul.ac.uk/misc/naseq.html (retrieved 2026-10-18).
4. seq = >EcoRI site
1 gaattc 6 gives revcomp = gaattc, length = 6. Source: OpenStax, Biology 2e, §14.2 DNA Structure and Sequencing (A pairs with T and G with C; the two strands are antiparallel), https://openstax.org/books/biology-2e/pages/14-2-dna-structure-and-sequencing (retrieved 2026-10-18).

## FAQ

### What is a reverse complement?

It is the sequence of the partner strand, written 5′ to 3′ like any sequence. The two strands of DNA are antiparallel, so the partner strand runs the other way: replace each base with its pair (A with T, G with C), then read the result backwards.

### How do I find the reverse complement of a DNA sequence?

Write the complement of each base (A to T, T to A, G to C, C to G), then reverse the order. For 5′-ATGC-3′, the complement is TACG and the reverse complement is 5′-GCAT-3′.

### What is the difference between the complement and the reverse complement?

The complement pairs each base but keeps the order, so it reads 3′ to 5′ under the sequence typed. The reverse complement also reverses the order, so it reads 5′ to 3′. Primers and probes are written as reverse complements.

### How does it handle RNA?

If the sequence has a U, it is read as RNA, and A pairs with U instead of T. AUGGCUAAC has the reverse complement GUUAGCCAU. A sequence with both T and U gets no answer.

### What do letters such as R, Y and N mean?

They are the IUPAC codes for a position that can hold more than one base: R is A or G, Y is C or T, N is any base. Their complements are R–Y, K–M, B–V and D–H; S, W and N are their own complements.

### Can I paste a FASTA sequence with numbers and spaces?

Yes. A header line that starts with > is dropped, and spaces, line breaks and position numbers are ignored. Lower-case letters stay lower case, so soft-masked regions keep their case.

## Sources

- Nomenclature Committee of the International Union of Biochemistry (NC-IUB), Nomenclature for Incompletely Specified Bases in Nucleic Acid Sequences, Recommendations 1984 (Eur. J. Biochem. 1985, 150, 1–5; Nucleic Acids Res. 1985, 13, 3021–3030): Table 1 symbols, Table 2 complementary symbols, sequences written 5′ to 3′, T and U as synonyms. https://iubmb.qmul.ac.uk/misc/naseq.html (retrieved 2026-10-18)
- OpenStax, Biology 2e, §14.2 DNA Structure and Sequencing: adenine and thymine, and cytosine and guanine, are complementary base pairs; the two strands are antiparallel. https://openstax.org/books/biology-2e/pages/14-2-dna-structure-and-sequencing (retrieved 2026-10-18)
