Factor calculator
Enter a whole number, get its factors, prime factors and whether it is prime.
How do I find all the factors of a number?
Divide it by 1, 2, 3 and so on up to its square root; each divisor that goes in evenly gives a pair. For 36: 1 × 36, 2 × 18, 3 × 12, 4 × 9 and 6 × 6, so the factors are 1, 2, 3, 4, 6, 9, 12, 18 and 36.
What is prime factorization?
Writing a number as a product of primes. 360 = 2 × 2 × 2 × 3 × 3 × 5, or 2³ × 3² × 5. Every whole number above 1 has exactly one prime factorization.
How do I tell if a number is prime?
A prime has exactly two factors, 1 and itself. Try dividing by the primes up to its square root: 97 is not divisible by 2, 3, 5 or 7 (√97 ≈ 9.8), so it is prime. 91 is not — it is 7 × 13.
Is 1 a prime number?
No. A prime needs exactly two different factors, and 1 has only one. The smallest prime is 2, the only even prime.
How many factors does a number have?
Add 1 to each exponent in its prime factorization and multiply. 360 = 2³ × 3² × 5¹ has (3 + 1) × (2 + 1) × (1 + 1) = 24 factors.
What is a perfect number?
A number equal to the sum of its factors other than itself. 28 is perfect: its factors are 1, 2, 4, 7, 14, 28, and 1 + 2 + 4 + 7 + 14 = 28. The next is 496, with proper factors adding to 496. Perfect numbers are rare, and every one known is even.
Why does a perfect square have an odd number of factors?
Factors come in pairs (d, n ÷ d), and the pairs only collapse into a single factor when d equals n ÷ d, that is, when n is a square. 36 has 9 factors (1, 2, 3, 4, 6, 9, 12, 18, 36), while 84 has 12: 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84.
Factors, multiples and prime factorization
A factor of n is a whole number that divides n with no remainder. Prime factorization splits n into primes, and the fundamental theorem of arithmetic says that for every whole number above 1 this product is unique apart from the order. The factors of n are all the products of the prime powers that appear in it, so the factorization tells you every factor, how many there are, and their greatest common factor with another number.
Worked example: 84 and 1,001
The prime factorization of 84 is 2² × 3 × 7, so its number of factors is (2 + 1) × (1 + 1) × (1 + 1) = 12, and they are 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84. A harder-looking number, 1,001, is 7 × 11 × 13, which is the reason a six-digit number such as 123,123 is always divisible by 7, 11 and 13: it equals 123 × 1,001. 97 has no factor up to √97 ≈ 9.8 other than 1, so it is prime, whereas 91 = 7 × 13 is not. The number 360 has 24 factors.
Common mistakes
Stopping the trial division too early is typical: to test a number n for primality you must try every prime up to √n; stopping earlier can miss a factor, and going beyond √n is unnecessary because factors come in pairs. Another is counting 1 as a prime, or leaving a repeated prime out of the factor count (the exponents in the formula matter: 12 = 2² × 3 has (2 + 1)(1 + 1) = 6 factors, not 4). Finally, factors and multiples are opposites: factors of 12 are at most 12, while its multiples go on forever.
Sources: OpenStax Prealgebra 2e (factors, multiples and prime factorization) and the fundamental theorem of arithmetic as stated in standard number theory texts; perfect numbers — Euclid's Elements, Book IX. Related: prime number calculator, LCM and GCF calculator, factorial calculator and fraction calculator.