Online Calculators and Tools | Calculators Toolbox
This perfect number checker shows if a number is perfect, abundant or deficient by summing its proper divisors.
Our free perfect number checker adds up the proper divisors of any whole number and tells you whether it's perfect, abundant or deficient. It shows every divisor and the total, so you can see exactly why.
A perfect number is a positive whole number that equals the sum of its proper divisors, which are all its divisors except the number itself. The smallest example is 6. Its proper divisors are 1, 2 and 3, and 1 + 2 + 3 = 6. The next is 28, because 1 + 2 + 4 + 7 + 14 = 28.
Perfect numbers are rare. Only four are smaller than ten thousand: 6, 28, 496 and 8,128. They fascinated ancient Greek mathematicians, who saw them as a kind of numerical harmony, and they still sit at the center of unsolved problems in number theory today.
Find all the proper divisors, add them up, and compare the total with the number.
For 12, the proper divisors are 1, 2, 3, 4 and 6, which add to 16. That's more than 12, so 12 is abundant. For 8, the proper divisors 1, 2 and 4 add to only 7, so 8 is deficient. Most numbers are deficient, a fair number are abundant, and perfect numbers are vanishingly rare.
Euclid described how to build even perfect numbers more than 2,000 years ago in his book Elements.
Medieval writers linked 6 and 28 to the six days of creation and the roughly 28-day lunar cycle.
Finding new perfect numbers depends on Mersenne primes, searched for by volunteer computers worldwide.
Checking whether numbers are perfect is a classic exercise for practicing factors and divisibility.
"Write a perfect number checker" is a popular beginner programming problem in Python, Java and JavaScript.
Abundant, deficient and perfect numbers appear regularly in contest problems and puzzles.
The divisor sum exactly equals the number. Every known perfect number is even, and each one has the form 2p−1 × (2p − 1), where 2p − 1 is a prime (called a Mersenne prime).
Example: p = 3 → 2² × 7 = 28.
The divisor sum is larger than the number. 12 is the smallest abundant number, and about a quarter of all whole numbers are abundant. Every multiple of a perfect number (other than itself) is abundant.
Example: 18 → 1 + 2 + 3 + 6 + 9 = 21.
The divisor sum is smaller than the number. Every prime is deficient (its only proper divisor is 1), as is every power of a prime.
Example: 16 → 1 + 2 + 4 + 8 = 15.
A related idea: two numbers where each one's proper divisors add up to the other. The smallest pair is 220 and 284. Enter either one in the checker and you'll see its divisor sum is the other number.
| # | Perfect number | Formula 2p−1(2p − 1) | Digits |
|---|---|---|---|
| 1 | 6 | p = 2 → 2 × 3 | 1 |
| 2 | 28 | p = 3 → 4 × 7 | 2 |
| 3 | 496 | p = 5 → 16 × 31 | 3 |
| 4 | 8,128 | p = 7 → 64 × 127 | 4 |
| 5 | 33,550,336 | p = 13 → 4,096 × 8,191 | 8 |
| 6 | 8,589,869,056 | p = 17 → 65,536 × 131,071 | 10 |
| 7 | 137,438,691,328 | p = 19 → 262,144 × 524,287 | 12 |
Is 496 a perfect number?
Notice how the pattern fits Euclid's formula: 2⁴ × (2⁵ − 1) = 16 × 31 = 496, and 31 is a Mersenne prime. Try 496 in the perfect number checker to see the full list of divisors.
Euclid showed that whenever 2p − 1 is prime, 2p−1(2p − 1) is perfect. About 2,000 years later, Leonhard Euler proved the reverse: every even perfect number must have this form. Together, these results tie perfect numbers directly to Mersenne primes. As of today, 52 Mersenne primes are known, so there are exactly 52 known perfect numbers, the largest with more than 82 million digits.
You don't need to test every number up to n. Test only up to √n, and each divisor d you find gives a partner n ÷ d. For 220, √220 ≈ 14.8, so test 1 to 14. The divisors 1, 2, 4, 5, 10 and 11 give partners 220, 110, 55, 44, 22 and 20. Drop 220 itself, add the rest, and you get 284, the other half of the famous amicable pair. Our checker uses exactly this shortcut, which is why it handles very large numbers instantly.
Adding up divisors by hand is tedious and error-prone for larger numbers. Our perfect number checker finds every proper divisor, adds them instantly, classifies the number as perfect, abundant or deficient, and shows the full working. It's great for students, teachers, coders testing their own programs and anyone curious about these rare numbers.
A perfect number is a positive whole number equal to the sum of its proper divisors, which are all its divisors except itself. 6 is perfect because 1 + 2 + 3 = 6.
The first four perfect numbers are 6, 28, 496 and 8,128.
An abundant number is one whose proper divisors add up to more than the number. 12 is the smallest, since 1 + 2 + 3 + 4 + 6 = 16.
A deficient number is one whose proper divisors add up to less than the number. All prime numbers are deficient, such as 7, whose only proper divisor is 1.
None has ever been found. Mathematicians have proved that if an odd perfect number exists, it must be enormous, but whether one exists is still unknown.
Every even perfect number has the form 2^(p−1) × (2^p − 1), where 2^p − 1 is a Mersenne prime. Each new Mersenne prime gives a new perfect number.