Skip to calculator

Perfect, Abundant & Deficient Number Classifier

Enter an integer and this calculator classifies it using the aliquot sum (the sum of proper divisors). You can also copy the results for notes, homework, or a quick proof check.

This page is designed for learners and curious explorers: it explains the definitions, shows the exact quantities computed, and includes several worked examples so you can verify the output by hand.

Calculator

How this number classifier works

This tool classifies a positive integer n as perfect, abundant, or deficient by computing the sum of its proper divisors. Proper divisors are all positive divisors of n except n itself. The sum of proper divisors is also called the aliquot sum and is commonly written as s(n).

The idea is simple: factors tell you how a number is built. When you add up the proper divisors, you get a measure of how “divisor-rich” the number is compared with itself. Numbers with unusually balanced divisor sums (perfect numbers) have been studied since antiquity, while abundant and deficient numbers help illustrate patterns in primes, composites, and multiplicative structure.

Definitions (the three classifications)

  • Perfect: the aliquot sum equals the number, so s(n) = n.
  • Abundant: the aliquot sum is greater than the number, so s(n) > n.
  • Deficient: the aliquot sum is less than the number, so s(n) < n.

Formula used (aliquot sum)

Let s(n) be the sum of proper divisors of n. Then:

s(n) = d|n,1d<n d

The calculator also reports two helpful derived values:

  • Difference: s(n) − n (positive for abundant, zero for perfect, negative for deficient).
  • Abundance index: s(n) / n (a ratio that makes it easier to compare numbers of different sizes).

How to use the calculator

  1. Enter an integer from 1 to 100,000.
  2. Choose whether to show the divisor list.
  3. Select Classify Number to see the classification, divisor sum, and related metrics.
  4. Optionally select Copy Results to copy the text summary into your clipboard.

Worked examples (quick sanity checks)

These examples help you verify that the output matches the standard definitions. If your result differs, double-check that you are using proper divisors (excluding the number itself).

  • n = 28: proper divisors are 1, 2, 4, 7, 14. Their sum is 28, so 28 is perfect.
  • n = 12: proper divisors are 1, 2, 3, 4, 6. Their sum is 16, so 12 is abundant.
  • n = 10: proper divisors are 1, 2, 5. Their sum is 8, so 10 is deficient.

Assumptions, limits, and performance notes

  • Input type: This calculator is for positive integers only (standard in elementary number theory).
  • Range: The form limits inputs to 1–100,000 to keep the page responsive.
  • Method: Divisors are found by trial division from 1 to n−1. This is simple and reliable for the allowed range, but it is not intended for very large integers.
  • Copying: The “Copy Results” button copies the visible text from the results panel. If your browser blocks clipboard access, you can still select and copy manually.

Why these classifications matter (brief context)

Perfect numbers (like 6 and 28) are historically important and surprisingly rare. Abundant numbers become more common as numbers grow, while primes are always deficient because their only proper divisor is 1. Exploring these categories is a practical way to build intuition about factors, divisor sums, and the structure of integers.

Number Analysis

Enter a positive integer (1–100,000). Tip: try 6, 28, 12, 18, 20, 496, or a prime like 97.

When enabled, the results include the full list of proper divisors used to compute the aliquot sum.

Understanding perfect, abundant, and deficient numbers (deeper guide)

The classification used by this calculator is based on the sum of proper divisors. This is closely related to the divisor-sum function σ(n), which sums all positive divisors of n, including 1 and n. Because proper divisors exclude n itself, the aliquot sum satisfies s(n) = σ(n) − n. Some textbooks define an “abundance” ratio using σ(n)/n; this page reports s(n)/n to match the values shown in the results panel.

Key terms (plain-language definitions)

If you are new to divisor sums, these short definitions help you read the output correctly:

  • Divisor: a positive integer d such that n divided by d leaves no remainder.
  • Proper divisor: any divisor of n other than n itself. For example, 1 is a proper divisor of every n > 1.
  • Aliquot sum: the sum of proper divisors, written s(n).
  • Difference: the signed gap s(n) − n, which tells you how far the number is from being perfect.
  • Abundance index (as used here): the ratio s(n)/n. Values greater than 1 indicate abundance; equal to 1 indicates perfection; less than 1 indicates deficiency.

Common patterns you can test (and why they happen)

  • Primes are deficient: if n is prime, its only proper divisor is 1, so s(n)=1 and therefore s(n)<n. Example: for 13, the proper divisors are just 1, so the sum is 1.
  • Prime powers are usually deficient: for p^k, the proper divisors are 1, p, p², …, pk−1. Their sum is a geometric series and typically stays below p^k.
  • Many even composites are abundant: numbers with several small prime factors tend to have many divisors, and those divisors add up quickly. Example: 24 has proper divisors 1, 2, 3, 4, 6, 8, 12 which sum to 36.
  • Perfect numbers are rare: small examples include 6, 28, 496, and 8128. They are special because their divisor structure balances exactly.

Step-by-step worked example: n = 36

To see how the calculator arrives at its classification, try 36 and compare with the manual steps below.

  1. List the proper divisors of 36 (all divisors less than 36): 1, 2, 3, 4, 6, 9, 12, 18.
  2. Add them: 1+2+3+4+6+9+12+18 = 55.
  3. Compare: 55 > 36, so 36 is abundant.
  4. Difference: s(n) − n = 55 − 36 = 19.
  5. Abundance index (as shown by this page): s(n)/n = 55/36 ≈ 1.5278.

Mini reference table (examples you can copy into the input)

Number Proper divisors Aliquot sum s(n) Classification s(n) − n
1 (none) 0 Deficient -1
6 1, 2, 3 6 Perfect 0
10 1, 2, 5 8 Deficient -2
12 1, 2, 3, 4, 6 16 Abundant +4
18 1, 2, 3, 6, 9 21 Abundant +3
28 1, 2, 4, 7, 14 28 Perfect 0
35 1, 5, 7 13 Deficient -22
36 1, 2, 3, 4, 6, 9, 12, 18 55 Abundant +19

Interpreting the results panel

After you submit the form, the results panel shows the number, its classification, and several supporting values. Here is how to read each line:

  • Proper Divisors: the list used to compute the aliquot sum. If you unchecked “Show All Divisors,” you may still see the list because the current script always prints it; the checkbox is preserved for compatibility and future enhancement.
  • Divisor Count: the number of proper divisors (excluding the number itself). For a prime, this will be 1 (just the divisor 1). For 1, it will be 0.
  • Divisor Sum (Aliquot Sum): the total of the proper divisors, s(n).
  • Difference (sum − n): a quick indicator of how far the number is from perfect.
  • Abundance Index: the ratio s(n)/n. Values near 1 are “close to perfect” in this specific sense.

Algorithm notes (what the JavaScript actually does)

The script uses a straightforward approach: it checks every integer i from 1 up to n−1 and collects i when n % i === 0. This is called trial division. Trial division is easy to understand and produces exact results, which is ideal for a teaching tool.

For larger ranges, a faster method is to factor n (or loop only up to √n and add divisor pairs). Those optimizations are not necessary here because the input is capped at 100,000. If you are experimenting near the upper limit and notice a delay, that is expected: checking many candidates takes time in any browser.

Frequently asked questions

Is 1 perfect, abundant, or deficient?

The number 1 has no proper divisors, so its aliquot sum is 0. Since 0 < 1, the calculator classifies 1 as deficient.

Why do some sources use σ(n) instead of s(n)?

The function σ(n) sums all divisors including n, while s(n) sums only proper divisors. They are directly related by s(n) = σ(n) − n. When comparing results across websites or textbooks, check which function is being used so you do not mix definitions.

What is an “odd perfect number”?

All currently known perfect numbers are even. Mathematicians have not proven whether an odd perfect number exists or not. Many partial results are known (for example, if one exists it must be extremely large and have a restricted prime factor structure), but the question remains open.

Can a number be both abundant and highly composite?

Yes. “Abundant” is about the sum of proper divisors, while “highly composite” is about having more divisors than any smaller number. Some numbers (like 12, 24, 36, 48, 60, 120) are abundant and also have unusually many divisors, but the concepts are not identical.

Practical uses (beyond curiosity)

While perfect and abundant numbers are often introduced as recreational mathematics, divisor sums show up in broader contexts: they help students practice factorization, support proofs about multiplicative functions, and appear in algorithm design where factor structure matters. In programming interviews and competitive programming, tasks involving divisor enumeration, sum-of-divisors functions, and classification by divisor properties are common because they test both math understanding and performance awareness.

Tips for exploring with this calculator

  • Try a sequence of primes (e.g., 97, 101, 103) and observe that the divisor list is always just 1.
  • Try powers of 2 (e.g., 32, 64, 128) and compare how the aliquot sum grows relative to the number.
  • Try numbers with many small factors (e.g., 60, 72, 84, 90, 120) and see how quickly they become abundant.
  • Try known perfect numbers within range (6, 28, 496, 8128) to confirm the definition.
  • Record the difference s(n) − n for nearby numbers to see how “close” they are to perfect.

Limitations (what this page does not do)

This calculator is intentionally focused: it classifies a single integer and shows the supporting divisor information. It does not attempt to generate perfect numbers, search for amicable pairs, compute prime factorizations, or use advanced number-theory optimizations. If you need those features, you can still use this page as a quick verifier for small to medium inputs.

Embed this calculator

Copy and paste the HTML below to add the Perfect, Abundant & Deficient Number Classifier (Aliquot Sum Calculator) to your website.