What is the Factors of a Number Calculator?
This tool finds every positive factor (divisor) of an integer you enter. It lists all factors in ascending order, groups them into factor pairs, shows the prime factorization in both expanded and exponent form, and tells you whether the number is prime, composite, or neither. It works for any positive or negative integer; the magnitudes of the divisors are the same either way.
How to use it
Type a whole number into the "Find the Factors of:" box and submit. The result shows the number of factors as the headline figure, with a detailed table beneath it. Zero is rejected because every nonzero integer divides it (infinitely many factors), and 1 is reported as neither prime nor composite.
The formula explained
The calculator uses trial division up to the square root of \(n\). For each \(i\) from 1 to \(\lfloor\sqrt{n}\rfloor\), if \(n \bmod i\) equals 0 then both \(i\) and \(\frac{n}{i}\) are factors, which naturally produces factor pairs:
$$i \times \frac{n}{i} = n$$The prime factorization repeatedly divides out the smallest prime:
$$n = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k}$$The number of factors is given by:
$$d(n) = (a_1+1)(a_2+1)\cdots(a_k+1)$$A number is prime when it has exactly two factors (1 and itself) and composite when it has more than two.
Worked example: 72
\(\sqrt{72}\) is about 8.49, so we test \(i = 1\) to 8. The divisors found are 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72 — twelve factors in six pairs: \(1\times72\), \(2\times36\), \(3\times24\), \(4\times18\), \(6\times12\), \(8\times9\). The prime factorization is
$$72 = 2 \times 2 \times 2 \times 3 \times 3 = 2^3 \times 3^2$$With 12 factors, 72 is composite.
FAQ
Why is a perfect square's factor count odd? Because its square root pairs with itself (for 36, the pair is \(6 \times 6\)), so that single factor is counted once.
Is 1 prime? No. 1 has only one factor and is classified as neither prime nor composite.
Do negative numbers have factors? Yes; their divisors have the same magnitudes as the absolute value, so we report the positive divisors of \(|n|\).