Connect via MCP →

Enter Calculation

Formula

Formula: Factors of a Number Calculator
Show calculation steps (1)
  1. Factor pair

    Factor pair: Factors of a Number Calculator

    Each divisor i of n pairs with n/i so that i times n/i equals n.

Advertisement

Results

Number of factors
12
positive divisors
All factors 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72
Factor pairs 1 × 72 = 72 2 × 36 = 72 3 × 24 = 72 4 × 18 = 72 6 × 12 = 72 8 × 9 = 72
Number of factor pairs 6
Prime factorization 72 = 2 × 2 × 2 × 3 × 3 = 2^3 × 3^2
Prime or composite? composite

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.

Advertisement
Factor tree breaking 72 into prime factors 2, 2, 2, 3, 3
A factor tree decomposes 72 into its prime factorization \(2^3 \times 3^2\).

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.

Factor pairs of 72 shown as linked boxes: 1x72, 2x36, 3x24, 4x18, 6x12, 8x9
The six factor pairs of 72 that each multiply to 72.

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|\).

Last updated: