Perfect Number Calculator
Enter a positive integer to see the sum of its proper divisors and learn whether it is perfect, abundant, or deficient.
Perfect — aliquot sum 28 vs 28
- 1
Trial division bound √n
√28 = 5.29Check every i from 2 up to this bound; each divisor i pairs with n ÷ i - 2
Sum of proper divisors
1 + 2 + 4 + 7 + 14 = 28
How does this calculator work?
A number is perfect when its proper divisors add up to itself, abundant when they sum to more, and deficient when they sum to less. Enter any positive integer and this calculator lists the divisors, reports the aliquot sum s, and classifies the number, also showing the abundance s − n.
Formula
How this is calculated
The single input n must be a positive integer. The calculator finds every proper divisor of n — that is, every positive divisor except n itself — and adds them together. This total is called the aliquot sum, written s.
To find the divisors efficiently, it loops i from 1 up to floor(sqrt(n)). Whenever n is divisible by i, both i and the paired divisor n/i are divisors, so both are added (taking care to add a square root only once when n is a perfect square, e.g. for n = 16 the divisor 4 is counted a single time). The divisor n itself is excluded because we only sum proper divisors.
The number is then classified by comparing s with n: it is perfect when s = n (for example 6 = 1 + 2 + 3, and 28 = 1 + 2 + 4 + 7 + 14), abundant when s > n (such as 12), and deficient when s < n (such as 8, and every prime, whose only proper divisor is 1). The abundance, s − n, measures how far the number is from being perfect: zero for perfect numbers, positive for abundant, negative for deficient. By convention n = 1 has no proper divisors so s = 0 and it is deficient.
Frequently asked questions
A perfect number equals the sum of its proper divisors (all positive divisors except itself). The smallest examples are 6, 28, 496, and 8128.
An abundant number has a divisor sum greater than the number (e.g. 12), while a deficient number has a divisor sum less than the number (e.g. 8 and all primes).
The aliquot sum is the sum of all proper divisors of a number. Comparing it to the number itself determines whether the number is perfect, abundant, or deficient.
Also known as
TG we-Calculate Editorial Team. (2026). Perfect Number Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/perfect-number-checker
TG we-Calculate Editorial Team. "Perfect Number Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/perfect-number-checker.
TG we-Calculate Editorial Team, "Perfect Number Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/perfect-number-checker
@misc{wecalculate_perfect_number_checker, title = {Perfect Number Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/perfect-number-checker}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
