Divisor Calculator
Count and sum of divisors of a positive integer.
How it works
Enumerate divisors up to √n and count both partners
E.g. 36 has 1,2,3,4,6,9,12,18,36 → 9 divisors. A prime has exactly two.
Worked example
Divisors of 36: 1, 2, 3, 4, 6, 9, 12, 18, 36 — 9 in total.
Check via prime factorisation: 36 = 2² × 3², count (2+1)(2+1) = 9.
Notes and limitations
Divisors come in pairs (1×36, 2×18, …), so test only up to √n. 1 and n count; a prime has exactly two divisors.