Perfect, Abundant & Deficient Number Checker

Classify any whole number as perfect, abundant or deficient from the sum of its proper divisors, or survey every number up to N.

Check
Any whole number from 1 up to 18 digits.
Sum of proper divisors
28aliquot sum s(n)
Abundance (s − n)
0
Sum of all divisors σ(n)
56
Number of divisors
6
Abundancy index σ(n)/n
2exactly 2 for perfect numbers
28 isPerfectits proper divisors add up to exactly n
  • Every even perfect number has the form 2^(p−1) × (2^p − 1) with 2^p − 1 prime (Euclid–Euler theorem). Here p = 3: 2^2 × 7.

Show the work

  1. Prime factorization: 28 = 22 × 7.
  2. Sum of all divisors: σ(n) = (23 − 1) ÷ (2 − 1) × (1 + 7) = 7 × 8 = 56.
  3. Aliquot sum (proper divisors only): s(n) = σ(n) − n = 56 − 28 = 28.
  4. Compare with n: 28 = 28, so 28 is perfect.

Proper divisors (5)

1 + 2 + 4 + 7 + 14 = 28

The ancient Greeks sorted whole numbers into three families by a single test: add up the number’s proper divisors — every divisor except the number itself — and compare the total with the number. Equal means perfect, more means abundant, less means deficient. This checker performs the test on any number up to 18 digits, explains it through the prime factorization, and can also survey every number up to a limit.

How to use the perfect number checker

  1. Choose One number or All numbers up to N.
  2. For one number, type it (up to 18 digits). For a survey, enter a limit up to 100,000.
  3. Read the classification on the tape, with the aliquot sum, the abundance or deficiency, the divisor count and the abundancy index. Proper divisors are listed below when there are not too many.
  4. In survey mode, the tape lists every perfect number found and counts the abundant and deficient ones; a table classifies the first 200 numbers.

Formulas

Let σ(n) be the sum of all divisors of n, including n. The aliquot sum is

s(n) = σ(n) − n

and the number is perfect when s(n) = n, abundant when s(n) > n, and deficient when s(n) < n. Equivalently, the abundancy index σ(n)/n is exactly 2 for a perfect number.

From the prime factorization n = p1a1 × p2a2 × …,

σ(n) = ∏ (piai+1 − 1) ÷ (pi − 1)

Worked examples

28. 28 = 22 × 7, so σ(28) = (23 − 1)/(2 − 1) × (1 + 7) = 7 × 8 = 56. The aliquot sum is 56 − 28 = 28, equal to the number: perfect. Check: 1 + 2 + 4 + 7 + 14 = 28.

12. σ(12) = 7 × 4 = 28, so s(12) = 16 > 12: abundant, with abundance 4.

16. σ(16) = 31, so s(16) = 15 < 16: deficient by exactly 1, as for every power of 2.

Survey up to 100: 2 perfect numbers (6 and 28), 22 abundant numbers starting 12, 18, 20, 24, 30, and 76 deficient numbers.

Perfect numbers and Mersenne primes

Euclid proved that whenever 2p − 1 is prime, the number 2p−1(2p − 1) is perfect. Two thousand years later, Euler showed that every even perfect number has this form. So perfect numbers and Mersenne primes come in matching pairs:

p Mersenne prime 2p − 1 Perfect number
2 3 6
3 7 28
5 31 496
7 127 8,128
13 8,191 33,550,336
17 131,071 8,589,869,056

Perfect numbers thin out dramatically: only four lie below 10,000, and the fifth already has eight digits. No odd perfect number has ever been found, and it has been shown that any odd perfect number would have to exceed 101500.

Facts about abundant numbers

  • About a quarter of all whole numbers are abundant (the exact density is close to 0.2476).
  • Every multiple of a perfect or abundant number is abundant.
  • The smallest odd abundant number is 945, whose proper divisors add up to 975.
  • Every whole number greater than 28,123 can be written as the sum of two abundant numbers.

To list a number’s divisors, use the factors calculator; for its prime structure, the prime factorization calculator. The prime number checker tests primality — useful for spotting Mersenne primes — and the Collatz sequence calculator explores another famous unsolved question about whole numbers.

Frequently asked questions

What is a perfect number?

A whole number equal to the sum of its proper divisors, meaning all its divisors except itself. 6 = 1 + 2 + 3 and 28 = 1 + 2 + 4 + 7 + 14 are the two smallest.

What are abundant and deficient numbers?

If the proper divisors add up to more than the number, it is abundant (12: 1 + 2 + 3 + 4 + 6 = 16). If they add up to less, it is deficient (8: 1 + 2 + 4 = 7). Every prime is deficient, since its only proper divisor is 1.

How many perfect numbers are known?

Fifty-two had been found by the end of 2024, all of them even. Each one corresponds to a Mersenne prime 2^p − 1, and new ones are found by distributed searches for Mersenne primes. Whether an odd perfect number exists is still unknown.

How is the divisor sum found so quickly?

From the prime factorization. If n = p^a × q^b × …, the sum of all divisors is σ(n) = (p^(a+1) − 1)/(p − 1) × (q^(b+1) − 1)/(q − 1) × … , so no divisor has to be listed individually.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.