Ad Space

Accepts positive integers up to 10,000,000 — larger numbers make trial division too slow for a browser to run smoothly.

All Factors
Factor Count
Classification
Ad Space

Factors vs. Prime Factorization

A factor (or divisor) of a number is any whole number that divides into it with no remainder. This is different from a prime factorization, which lists only the prime building blocks and how many times each appears. The factors of 12 are 1, 2, 3, 4, 6, and 12 — six numbers total — while the prime factorization of 12 is 2 squared times 3, just two distinct primes. Every factor of 12 can actually be built by multiplying some combination of those primes together (1 is the empty combination, 4 is 2 times 2, 6 is 2 times 3, and 12 is 2 times 2 times 3), but the full factor list and the prime factorization answer two different questions and are not interchangeable.

How This Calculator Finds Every Factor

Checking every number one by one up to n itself would be slow for large inputs. Instead, this calculator only tests candidate divisors up to the square root of n:

if d divides n, then n/d also divides n\text{if } d \text{ divides } n, \text{ then } n / d \text{ also divides } n

n: the number being factored.

d: a candidate divisor being tested.

Every time a divisor d up to the square root is found, its pair n divided by d is also a factor, so both get added to the list at once — cutting the work roughly in half compared to checking every number up to n.

Worked Example: Factoring 36

Testing divisors of 36 from 1 up to its square root (6): 1 pairs with 36, 2 pairs with 18, 3 pairs with 12, 4 pairs with 9, and 6 pairs with itself (6 times 6 equals 36, so it's only counted once). That gives the complete factor list: 1, 2, 3, 4, 6, 9, 12, 18, 36 — nine factors total. Since 36 has more than two factors, it's composite, not prime.

Prime, Composite, and Perfect Numbers

A number is prime if it has exactly two factors: 1 and itself. A number is composite if it has more than two factors. A number is perfect if the sum of its proper divisors (every factor except the number itself) equals the number. 6 is the smallest perfect number: its proper divisors are 1, 2, and 3, and 1 plus 2 plus 3 equals 6 exactly. The next perfect number is 28 (1 plus 2 plus 4 plus 7 plus 14 equals 28) — perfect numbers get rare very quickly, and every even one known is tied to a Mersenne prime through a formula Euclid proved over two thousand years ago.

A Brief History of Divisibility

The study of factors and divisibility is one of the oldest branches of number theory, appearing in Euclid's "Elements" around 300 BCE, including his proof connecting perfect numbers to what are now called Mersenne primes. Whether any odd perfect number exists is still an open question in mathematics today, unresolved despite centuries of searching — every perfect number ever found has been even.

Common Factoring Mistakes

Forgetting to include 1 and the number itself is a frequent slip — both are always factors of any positive integer, even though they're easy to overlook when focused on the "interesting" middle factors. Confusing factors with multiples is another common mix-up: multiples of 12 (12, 24, 36, ...) go on forever, while factors of 12 are a short, fixed list. Stopping the search too early (not checking all the way up to the square root) can also silently miss a factor pair in the middle of the list.

Factor Terms You Should Know

Factor (Divisor) — a whole number that divides evenly into another number, leaving no remainder.

Proper Divisor — any factor of a number except the number itself.

Prime Number — a number with exactly two factors: 1 and itself.

Composite Number — a number with more than two factors.

Perfect Number — a number equal to the sum of its own proper divisors.

Frequently Asked Questions

What is the difference between factors and prime factorization?

Factors are every whole number that divides evenly into a number, including 1 and the number itself. Prime factorization is the specific set of prime numbers that multiply together to build it. For 12, the factors are 1, 2, 3, 4, 6, and 12, while the prime factorization is 2 squared times 3.

What makes a number a perfect number?

A perfect number equals the sum of its proper divisors (all its factors except itself). 6 is the smallest example: its proper divisors are 1, 2, and 3, and 1 plus 2 plus 3 equals 6. Perfect numbers are extremely rare — only a handful are known below very large bounds.

Why does this calculator only check divisors up to the square root?

Factors always come in pairs that multiply to the number. Once one factor in a pair exceeds the square root, its partner must be smaller than the square root, so it was already found — checking any further would just rediscover pairs in reverse order.

Ad Space