Last updated October 6, 2026 · Report an error
Twin primes are pairs of prime numbers that differ by exactly 2 — like 11 and 13, or 17 and 19 — and they're one of the most famous unsolved mysteries in number theory: nobody has ever proven whether infinitely many twin prime pairs exist.
This checker tells you whether a given number is prime and, if so, whether it's part of a twin prime pair with its neighbor two below or two above it.
How it works
Enter a number. The checker first tests whether the number itself is prime, then checks whether the number 2 less or 2 greater than it is also prime. If either neighbor is prime, the number is part of a twin prime pair.
- Enter number.
- Click Calculate to see your results.
Examples
11 and 13
Both 11 and 13 are prime, and they differ by exactly 2, making (11, 13) a twin prime pair — entering either 11 or 13 confirms this.
Who should use it
- Exploring number theory concepts like twin primes for coursework or personal curiosity.
- Verifying whether a specific number of interest is part of a twin prime pair.
Industry applications
- Mathematics and number theory education
- Cryptography research and prime number studies
Advantages
- Checks both possible twin prime pairings (n-2 and n+2) for the given number.
- Handles numbers up to 1 billion.
Limitations
- Trial-division primality testing becomes slower (though still functional) for numbers near the upper limit.
Common mistakes to avoid
- Assuming any two primes close together are "twin primes" — the term specifically means a difference of exactly 2.
- Forgetting to check both neighbors (n-2 and n+2) — a number can be a twin prime via either one.
Best practices
- Remember that being prime is a prerequisite — a number must be prime itself before it can be checked as part of a twin prime pair.
Tips
- Twin primes get rarer as numbers get larger, so don't be surprised if a very large randomly-chosen number isn't part of a twin prime pair.