Perfect Number Checker
Instantly check whether any positive integer is a perfect number — one that equals the sum of its proper divisors. Useful for number theory study and math competitions.
About this calculator
A perfect number is a positive integer that equals the sum of all its proper divisors (every divisor excluding the number itself). Formally, n is perfect if σ(n) − n = n, where σ(n) is the sum of all divisors. The algorithm sums all integers i from 1 to n − 1 where n % i = 0, then checks whether that sum equals n. The first four perfect numbers are 6, 28, 496, and 8128. Every known perfect number is even and takes the form 2^(p−1) × (2^p − 1), where 2^p − 1 is a Mersenne prime. No odd perfect number has ever been found, making them one of mathematics' oldest unsolved mysteries.
How to use
Enter the number 28. The calculator tests every integer from 1 to 27 for divisibility: divisors are 1, 2, 4, 7, and 14. Their sum is 1 + 2 + 4 + 7 + 14 = 28, which equals the input. The result is 'Perfect'. Now try 12: its proper divisors are 1, 2, 3, 4, and 6, summing to 16 ≠ 12, so 12 is not perfect. Simply type any positive integer and the checker returns the verdict immediately.
Frequently asked questions
What are the first few perfect numbers and how were they discovered?
The first four perfect numbers are 6, 28, 496, and 8128 — all known to ancient Greek mathematicians. Euclid proved that 2^(p−1) × (2^p − 1) is perfect whenever 2^p − 1 is prime (a Mersenne prime). The fifth perfect number, 33,550,336, was not recorded until the medieval period. As of today, only 51 perfect numbers are known, all even, and each corresponds to a known Mersenne prime.
Why is 6 considered the smallest perfect number?
The proper divisors of 6 are 1, 2, and 3, and 1 + 2 + 3 = 6 exactly. By definition, this makes 6 perfect. The number 1 is excluded because its only divisor less than itself is none, giving a sum of 0. Numbers like 4 (divisors 1, 2 → sum 3) and 5 (divisors 1 → sum 1) fall short, confirming 6 is the smallest case.
How does the perfect number checker handle very large inputs?
The checker iterates through all integers from 1 up to n − 1, so runtime grows linearly with n. For small to medium numbers this is near-instant in a browser. For very large numbers the check can slow down, since no mathematical shortcut is applied beyond the loop. If you need to test large candidates efficiently, specialized algorithms using Mersenne prime tests are preferred. For typical educational use, inputs up to a few million work comfortably.