Divisor Function Calculator
This divisor function calculator works out sigma of n, the sum of every positive divisor of a whole number, together with how many divisors it has and what those divisors add up to when you leave out the number itself. Divisors and their sums turn up throughout number theory, from testing whether a number is prime or composite to classifying it as perfect, abundant or deficient, and they follow neat formulas once you know a number's prime factorisation. You enter any whole number n from 1 up to one billion, and the calculator returns three figures at once: sigma of n, the total of all its divisors including 1 and n; the number of divisors it has; and the sum of its proper divisors, meaning every divisor except n itself. Large results are grouped with commas so they stay easy to read. Try the default value of 12 to see how it works: its divisors are 1, 2, 3, 4, 6 and 12, giving sigma(12) = 28, a divisor count of 6, and a proper divisor sum of 16, one short of 12 itself, which makes 12 an abundant number. Change the number and the results update immediately using an exact integer algorithm, so the figures stay precise even for large values. It is a handy tool for students, programmers and anyone curious about how a number's factors behave.
The formula
sigma(n) adds every divisor of n from 1 to n. The number of divisors counts them. If n = p1^a1 times p2^a2 and so on, then the divisor count is the product of (ai + 1), and sigma is the product of (p^(ai+1) minus 1) divided by (p minus 1).
Worked example
12 has divisors 1, 2, 3, 4, 6 and 12, so sigma(12) = 28, there are 6 divisors, and the proper divisors (excluding 12) sum to 16. Enter 12 to confirm.
Frequently asked questions
What is the divisor function sigma?
The sum of all positive divisors of n, including 1 and n. For 12 it is 1 + 2 + 3 + 4 + 6 + 12 = 28.
What is the number of divisors?
How many positive divisors n has. For a factorisation into primes, multiply each exponent plus one together.
How does it classify a number?
If the proper divisor sum (sigma minus n) equals n the number is perfect; more is abundant, less is deficient.
Who this calculator is for
This calculator is for students, programmers and anyone exploring number theory.
What this calculator assumes
- You enter a whole number within the stated range.
- The exact integer algorithm is used.
- Very large results are shown grouped for readability.
Formula and sources
Related calculators
- Prime Factorization Calculator: break a number into prime factors.
- LCM Calculator: lowest common multiple.
- GCF Calculator: greatest common factor.