Divisors and Prime Number Checker
Check whether a number is prime and list all its divisors, with the number and sum of divisors, prime factorisation and nearest primes.
How to use this calculator
Enter a whole number. The calculator tests whether it is prime, finds its prime factorisation and every divisor, counts and adds the divisors, classifies the number as perfect, abundant or deficient, and finds the closest primes below and above it.
Formula
Trial division by primes up to √n gives the prime factorisation n = p₁^a₁ × p₂^a₂ × …. Number of divisors d(n) = (a₁ + 1)(a₂ + 1)…; sum of divisors σ(n) = Π (p^(a+1) − 1) ÷ (p − 1). n is perfect if σ(n) − n = n, abundant if greater and deficient if smaller.
Calculator credits
Calculator developmentJulia Edwards
Editorial supervisionSamad Aslam Khan
Expert reviewIfrahMSc Mathematics
Published byThe Calculatorz
Last updated
Read how we research, test, review and correct our calculators in our editorial policy.
Frequently asked questions
What is a prime number?
A whole number greater than 1 whose only divisors are 1 and itself, such as 2, 3, 5, 7 and 11.
Is 1 a prime number?
No. By definition a prime has exactly two divisors, and 1 has only one.
What is a perfect number?
A number equal to the sum of its proper divisors, such as 6 = 1 + 2 + 3 and 28.
Why do squares have an odd number of divisors?
Divisors pair up as d and n ÷ d, except the square root, which pairs with itself.
How is this different from the GCF and LCM calculator?
That tool compares two or more numbers. This one examines a single number in depth.
How large a number can I check?
Up to one trillion. Larger numbers need specialised primality tests.
References & methodology sources
These sources support the calculator’s formula, definitions, thresholds, units or result interpretation.
- OEIS Foundation. (n.d.). A000005: d(n), the number of divisors of n. The On-Line Encyclopedia of Integer Sequences. View source
- OEIS Foundation. (n.d.). A000203: σ(n), the sum of the divisors of n. The On-Line Encyclopedia of Integer Sequences. View source
- Hardy, G. H., Wright, E. M., Heath-Brown, D. R., & Silverman, J. H. (2008). An introduction to the theory of numbers (6th ed.). Oxford University Press. View source
- Marecek, L., & Honeycutt Mathis, A. (2020). Prime factorization and the least common multiple. In Prealgebra 2e (Section 2.5). OpenStax. View source