Divisor Count Calculator
Enter a positive integer to find how many divisors it has and what they sum to — instantly see whether your number is prime, perfect, or abundant.
Count and sum at once
The calculator returns both the total number of positive divisors and their sum — two key quantities used throughout number theory.
Positive integers only
Only whole numbers of 1 and above are supported. Zero, negative numbers, and decimals have no positive divisors in the standard definition.
What is a divisor?
A number that divides evenly into another
A divisor (also called a factor) of a positive integer n is any positive integer that divides n with no remainder. For example, the divisors of 12 are 1, 2, 3, 4, 6, and 12 — each divides 12 exactly. Counting and summing divisors are two of the oldest operations in number theory, appearing in the study of prime numbers, perfect numbers, and combinatorics. According to Wolfram MathWorld, the number of divisors is written τ(n) and the sum of divisors is written σ(n). This calculator computes both at once from a single input.
Enter any positive integer to get the divisor count τ(n) and divisor sum σ(n) — including whether the number might be prime or perfect.
To find all divisors efficiently, the algorithm tests every integer from 1 up to the square root of n. Whenever i divides n exactly, both i and n/i are divisors; if they are equal (n is a perfect square), only one is counted.
for i = 1 to √n: if n mod i = 0, count i and n÷i as divisorsTake n = 360. Its square root is about 18.97, so the loop tests i = 1 through 18. Each i that divides 360 contributes itself and the paired divisor 360/i. Counting all 12 pairs gives 24 divisors in total. Adding every divisor from 1 to 360 gives σ(360) = 1170.
The divisor count tells you a great deal about a number's structure in number theory. A result of exactly 2 means the number has no divisors other than 1 and itself — that is the definition of a prime number. For example, 17 returns a divisor count of 2, confirming it is prime. A divisor count of 1 applies only to n = 1, which is neither prime nor composite. Higher counts signal composite numbers with rich factor structure; 360, for instance, returns 24 — one reason it was chosen as the number of degrees in a circle and the base of ancient calendars. The divisor sum is equally informative. When the sum of a number's proper divisors (all divisors except the number itself) equals the number, the number is called perfect. The classic example is 28: its proper divisors are 1, 2, 4, 7, and 14, and 1 + 2 + 4 + 7 + 14 = 28, so σ(28) = 56 and 56 − 28 = 28. When the proper-divisor sum exceeds the number the number is called abundant; when it falls short the number is called deficient. These categories arise naturally in combinatorics, cryptography, and recreational mathematics.
The algorithm is exact but has practical boundaries to be aware of.
Positive integers and computation time
This calculator counts positive divisors only — 1 and the number itself are always included. Zero, negative integers, and non-integers have no positive divisors in the standard definition and return no result. The input is capped at 1,000,000,000 because the square-root algorithm must test up to roughly 31,623 candidate divisors for the largest values, which keeps response time instant in a browser. For larger numbers a prime-factorisation approach would be needed but is outside the scope of this tool.