Check if a number is prime and find prime factorization
Type any positive integer up to 1,000,000 and find out instantly whether it is prime. The tool returns the full prime factorization of composite numbers, lists all divisors, and identifies the nearest primes before and after your number. It also flags special classes - twin primes, Sophie Germain primes - and, for even numbers, shows Goldbach pairs (two primes that sum to your number).
Initializing in your browser…
Calculate Greatest Common Divisor and Least Common Multiple of multiple numbers. Shows prime factorization and common divisors.
Advanced calculator with scientific functions and history
Plot and visualize mathematical functions with multiple overlays
You want to know whether 561 is prime, it "feels" prime but you are not sure.
Number
561
Result
Not prime · 561 = 3 × 11 × 17
561 looks prime but factors as 3 × 11 × 17, it is in fact a Carmichael number that fools naive primality tests, which is exactly why a real factorisation beats intuition. The tool returns the full prime factorisation, not just a yes/no.
Type any positive integer up to 1,000,000 and find out instantly whether it is prime. The tool returns the full prime factorization of composite numbers, lists all divisors, and identifies the nearest primes before and after your number. It also flags special classes - twin primes, Sophie Germain primes - and, for even numbers, shows Goldbach pairs (two primes that sum to your number).
Primality is tested with 6k+/-1 trial division (checking divisibility by 2 and 3, then candidate divisors of the form 6k-1 and 6k+1 up to the square root), which is fast for values within the 1,000,000 cap. Prime factorization strips out factors of 2 and then odd factors up to the square root. A number is flagged as a twin prime when it is prime and either n-2 or n+2 is also prime, and as a Sophie Germain prime when both p and 2p+1 are prime. For even inputs greater than 2, every pair of primes summing to the value is enumerated to illustrate the Goldbach conjecture. A separate range generator lists primes between two bounds (up to 100 results), and a first-20-primes panel lets you jump straight to a known prime.
Quickly verify whether a number is prime and check factorizations, twin primes, and Goldbach pairs.
Explore prime numbers and factorization, the foundation of RSA encryption.
Up to 1,000,000. Entering a larger value shows a "number too large" message, since the trial-division approach is tuned for that range.
No. By mathematical convention, 1 is neither prime nor composite.
A twin prime is a prime that differs by 2 from another prime (such as 11 and 13). A Sophie Germain prime is a prime p for which 2p+1 is also prime. The tool checks both for your input.
Every calculation runs locally in your browser. Your numbers and expressions are not transmitted or stored.