Twin Prime Checker
Check whether two numbers form a twin prime pair (both prime, difference of 2).
About Twin Prime Checker
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
Worked example
With the default values below, Twin Prime Checker returns Twin Prime Pair? of Yes. Change any input above and every figure here is recalculated in your browser.
Inputs used
- First Numberminimum 2
- 11
- Second Numberminimum 2
- 13
Results
- Twin Prime Pair?
- Yes
- First Number Prime?
- Yes
- Second Number Prime?
- Yes
- Difference
- 2
Step by step
- 1Is 11 prime?= Yes
- 2Is 13 prime?= Yes
- 3Difference= 2
- 4Twin prime pair?= Yes — (11, 13)
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
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.
