Skip to content
Calcrivo

Twin Prime Checker

Check whether two numbers form a twin prime pair (both prime, difference of 2).

Inputs

First candidate of the twin prime pair.

Second candidate of the twin prime pair.

Twin Prime Pair?

Yes

First Number Prime?

Yes

Second Number Prime?

Yes

Difference

2

Step by step

  1. Is 11 prime?

    = Yes

  2. Is 13 prime?

    = Yes

  3. Difference

    = 2

  4. Twin prime pair?

    = Yes — (11, 13)

How it works

Twin primes are pairs of prime numbers that differ by exactly 2, such as (3, 5), (11, 13), and (17, 19). The Twin Prime Conjecture — that there are infinitely many such pairs — remains unproven. This calculator checks that both inputs are prime and that their absolute difference is 2.

Formula

Twin prime condition

(p, p+2) are twin primes ⟺ p is prime AND p+2 is prime

p
Smaller prime of the pair

Frequently Asked Questions

What are some examples of twin primes?

(3, 5), (5, 7), (11, 13), (17, 19), (29, 31), (41, 43), (59, 61), (71, 73).

Are there infinitely many twin primes?

This is the famous Twin Prime Conjecture. It has not been proven or disproven. In 2013, Yitang Zhang proved there are infinitely many pairs of primes with gap ≤ 70 million, later reduced to 246.

You might also need