Integer factorization · instant answers

How we compute factors

Three steps to a verifiable factorization.

  1. 1

    Try dividing from 1 to √n, collecting every divisor together with its paired factor.

  2. 2

    Repeatedly divide n by its smallest prime factor to obtain the unique prime factorization.

  3. 3

    Write factors, pairs, prime factorization and properties into the page, then independently recompute everything in tests.

Every result depends only on the input integer, so pre-rendered pages stay correct forever.

What you should know about factors

What is a factor

A factor divides an integer exactly, with no remainder. 1 and the number itself are always factors.

Factors come in pairs

If a × b = n, both a and b are factors of n. Factors therefore come in pairs, except the middle factor of a perfect square, which pairs with itself.

Prime factorization

A composite number can be written as a product of primes, e.g. 72 = 2³ × 3². The result is unique — the fundamental theorem of arithmetic.

Primes have no proper factors

A prime has exactly two factors: 1 and itself, e.g. 97. To test primality you only need to check primes up to √n.