All divisors
Last updated 3 September 2026
What the factorisation tells you
Every whole number above one is either prime or a unique product of primes, and that product is more informative than it first looks. The number of divisors falls straight out of it: add one to each exponent and multiply. So 360, which factors as 2³ × 3² × 5, has 4 × 3 × 2 = 24 divisors without anyone needing to list them. Primality testing here uses trial division up to the square root, which is enough for any number this tool accepts — if nothing below the square root divides it, nothing above will either, because factors come in pairs that straddle that point.
Why testing stops at the square root
Checking whether a number is prime does not require testing every smaller number. Factors always come in pairs that multiply to the target, and in every such pair one factor is at or below the square root while the other is at or above it. So if nothing up to the square root divides the number, nothing above it will either.
For 97, that means testing only up to 9 — and only the primes 2, 3, 5 and 7 at that, since any composite divisor would already have been caught by its own prime factors. Four tests instead of ninety-five. On large numbers the saving is the difference between a calculation that finishes and one that does not.
One, primes and the fundamental theorem
A common question is why 1 is not prime, since nothing divides it but itself. The reason is not arbitrary. The fundamental theorem of arithmetic states that every integer above 1 has exactly one prime factorisation. If 1 were prime, 12 could be written as 2 × 2 × 3, or 1 × 2 × 2 × 3, or 1 × 1 × 2 × 2 × 3, and uniqueness would be lost. Excluding 1 keeps the theorem intact, and a great deal of number theory depends on it.
Primes also thin out as numbers grow, but never run out — Euclid proved there are infinitely many over two thousand years ago. Their unpredictable distribution is what makes modern cryptography work: multiplying two large primes together is easy, and recovering them from the product is hard enough that RSA encryption rests on the difficulty.
Common questions
Why only check divisors up to the square root?
Because factors come in pairs. If a number has a factor larger than its square root, the matching factor must be smaller than the square root — so if nothing small divides it, nothing large will either. That cuts the work enormously.
Is 1 a prime number?
No. A prime has exactly two distinct divisors, one and itself. The number 1 has only one divisor, so it fits neither the definition of prime nor composite — it sits on its own.
How large a number can it handle?
Up to 9,007,199,254,740,991, which is the largest integer JavaScript can represent exactly. Above that, ordinary arithmetic starts losing precision, so the tool declines the input rather than returning a confident wrong answer.
What does the sum of divisors mean?
It adds up every divisor including the number itself. It is how perfect numbers are defined — a number whose divisors excluding itself add up to the number, like 6 (1 + 2 + 3) or 28.
Why only test divisors up to the square root?
Factors come in pairs, and in every pair one member is at or below the square root. If nothing up to the square root divides the number, nothing above it can either. For 97 that means checking only up to 9 rather than up to 96.
Why is 1 not a prime number?
Because the fundamental theorem of arithmetic requires every integer above 1 to have exactly one prime factorisation. If 1 counted as prime, any number could be written with unlimited extra factors of 1 and that uniqueness would be lost.
Why are prime numbers important in cryptography?
Multiplying two large primes is easy, but recovering the original primes from the product is extremely hard. RSA encryption rests on that asymmetry — the public key can be shared safely because factoring it back is computationally impractical.