➗ Factors Calculator
By Shihab Mia · Updated 2026-08-03
Enter a whole number of 2 or more to list every factor and the prime factorization.
This factors calculator lists every factor of any whole number the moment you type it in, along with the total factor count, the prime factorization, and whether the number is prime or a perfect square. Type 24 and you instantly see 1, 2, 3, 4, 6, 8, 12 and 24, eight factors in total, with a prime factorization of 2 cubed times 3. Everything runs in your browser, so no number you enter is ever sent anywhere.
What is the Factors Calculator?
A factor of a whole number n is any whole number that divides n exactly, leaving no remainder. Factors always come in pairs that multiply together to give n: for 24, the pair 4 and 6 works because 4 times 6 equals 24, and so does the pair 2 and 12, and the pair 1 and 24. This pairing is exactly why this factors calculator only has to check divisors up to the square root of n. Once you test every whole number from 1 up to √n, you have already found the small half of every pair, and the large half (n divided by that number) comes along for free. Testing 24 only needs the numbers 1 through 4, not all the way up to 24, because √24 is about 4.9.
Every whole number greater than 1 has a unique prime factorization, meaning it can be written as a product of prime numbers in exactly one way (ignoring order). This is called the fundamental theorem of arithmetic, and it is what makes prime factorization such a reliable tool. To find it, this calculator repeatedly divides the number by 2 for as long as that works, tracking how many times it succeeded as the exponent, then moves on to 3, then 5, then every odd number up to the square root of whatever is left. For 24 that process is 24 to 12 to 6 to 3 (three divisions by 2, so 2 cubed), and what remains, 3, is itself prime, giving the final factorization 2 cubed times 3, or 2³ × 3.
The total factor count of a number follows directly from its prime factorization. If n = p1^a1 × p2^a2 × ... × pk^ak, the number of factors equals (a1 + 1) × (a2 + 1) × ... × (ak + 1). For 24 = 2³ × 3¹, that is (3 + 1) × (1 + 1) = 4 × 2 = 8 factors, which matches the list this factors calculator produces. This shortcut is genuinely useful once numbers get large: you can know a number has, say, 96 factors without ever writing all 96 of them out, just from its prime factorization.
A number is prime when it has exactly two factors, 1 and itself, and composite when it has more than two. A number is a perfect square exactly when every exponent in its prime factorization is even, which is also why perfect squares always have an odd total factor count (each (exponent + 1) term is odd, and a product of odd numbers is odd). 36 = 2² × 3² has (2+1) × (2+1) = 9 factors, an odd number, and 36 is indeed a perfect square (6²). This factors calculator checks both conditions automatically for every number you enter.
When to use it
- Finding all the factor pairs of a number for a homework problem or a math class.
- Getting the prime factorization to simplify a fraction or find a common denominator.
- Checking whether a number is prime before using it in an encryption or coding exercise.
- Finding the greatest common factor of two numbers by comparing their factor lists.
- Confirming whether a number is a perfect square when working with roots and radicals.
- Exploring factor patterns for a puzzle, a game, or a curiosity about a specific number.
How to use the Factors Calculator
- Type any whole number of 2 or more into the input box.
- Read the full list of factors, sorted from smallest to largest, in the results panel.
- Check the summary cards for the total factor count, whether the number is prime, and whether it is a perfect square.
- Review the prime factorization shown with exponents, then copy the factor list with one click if you need it elsewhere.
Formula & method
Worked examples
Find every factor and the prime factorization of 24.
- √24 ≈ 4.9, so only test whole numbers i from 1 to 4.
- i = 1: 24 ÷ 1 = 24, so 1 and 24 are both factors.
- i = 2: 24 ÷ 2 = 12, so 2 and 12 are both factors.
- i = 3: 24 ÷ 3 = 8, so 3 and 8 are both factors.
- i = 4: 24 ÷ 4 = 6, so 4 and 6 are both factors. Sorted, that is 1, 2, 3, 4, 6, 8, 12, 24, eight factors total.
- Prime factorization: 24 ÷ 2 = 12, ÷ 2 = 6, ÷ 2 = 3 (three divisions by 2, so 2³), and 3 is prime, giving 2³ × 3.
Result: 24 has 8 factors: 1, 2, 3, 4, 6, 8, 12, 24; prime factorization 2³ × 3
Find every factor of 100 and confirm it is a perfect square.
- √100 = 10 exactly, so test whole numbers i from 1 to 10.
- i = 1: pair 1 and 100. i = 2: pair 2 and 50. i = 4: pair 4 and 25. i = 5: pair 5 and 20. i = 10: pair 10 and 10, which dedupes to a single factor because both halves match.
- i = 3, 6, 7, 8, 9 all leave a remainder when dividing 100, so they are skipped.
- Sorted list: 1, 2, 4, 5, 10, 20, 25, 50, 100, which is 9 factors.
- Because √100 is a whole number (10), 100 is a perfect square, and 9 (an odd count) confirms it, since 100 = 2² × 5² and (2+1) × (2+1) = 9.
Result: 100 has 9 factors: 1, 2, 4, 5, 10, 20, 25, 50, 100; prime factorization 2² × 5²; it is a perfect square
Factors of common numbers from 12 to 100
| Number | Factors | Count | Prime? |
|---|---|---|---|
| 12 | 1, 2, 3, 4, 6, 12 | 6 | No |
| 16 | 1, 2, 4, 8, 16 | 5 | No |
| 18 | 1, 2, 3, 6, 9, 18 | 6 | No |
| 20 | 1, 2, 4, 5, 10, 20 | 6 | No |
| 24 | 1, 2, 3, 4, 6, 8, 12, 24 | 8 | No |
| 30 | 1, 2, 3, 5, 6, 10, 15, 30 | 8 | No |
| 36 | 1, 2, 3, 4, 6, 9, 12, 18, 36 | 9 | No |
| 48 | 1, 2, 3, 4, 6, 8, 12, 16, 24, 48 | 10 | No |
| 60 | 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60 | 12 | No |
| 100 | 1, 2, 4, 5, 10, 20, 25, 50, 100 | 9 | No |
Perfect squares always have an odd number of factors
| Perfect square | Prime factorization | Factors | Count |
|---|---|---|---|
| 4 | 2² | 1, 2, 4 | 3 |
| 9 | 3² | 1, 3, 9 | 3 |
| 16 | 2⁴ | 1, 2, 4, 8, 16 | 5 |
| 25 | 5² | 1, 5, 25 | 3 |
| 36 | 2² × 3² | 1, 2, 3, 4, 6, 9, 12, 18, 36 | 9 |
| 64 | 2⁶ | 1, 2, 4, 8, 16, 32, 64 | 7 |
Common mistakes to avoid
- Stopping the search too early. Some people only test small divisors like 2, 3 and 5 and stop once those fail, missing larger prime factors. You have to keep testing every whole number up to the square root of n (or use its full prime factorization) to be sure you have found every factor.
- Forgetting the paired factor. When you find that i divides n, the number n / i is a factor too, and it is usually the more important one to remember. Testing that 24 ÷ 3 = 8 means both 3 and 8 belong on the list, not just 3.
- Double-counting the square root factor. When n is a perfect square, the middle divisor pairs with itself (for 100, that is 10 and 10). It should only be listed once, which is why this calculator counts 100 as having 9 factors, not 10.
- Confusing factors with prime factors. 24 has 8 total factors but only 2 distinct prime factors (2 and 3). The full factor list includes every whole number that divides 24 exactly, while the prime factorization only lists the primes that multiply together to build it.
Glossary
- Factor (divisor)
- A whole number that divides another whole number exactly, with no remainder. 6 is a factor of 24 because 24 ÷ 6 = 4 exactly.
- Factor pair
- Two factors that multiply together to give the original number, such as 4 and 6 for 24 (4 × 6 = 24).
- Prime factorization
- A number written as a product of prime numbers, such as 24 = 2³ × 3. Every whole number above 1 has exactly one, ignoring order.
- Prime number
- A whole number greater than 1 with exactly two factors: 1 and itself. 2, 3, 5, 7 and 11 are the first few primes.
- Composite number
- A whole number greater than 1 with more than two factors, meaning it can be broken down into smaller factors.
- Perfect square
- A number that is the product of a whole number multiplied by itself, such as 36 = 6 × 6. Perfect squares always have an odd total number of factors.
Frequently asked questions
How do you find all the factors of a number?
Test every whole number from 1 up to the square root of the number. Whenever it divides evenly, both that number and the result of the division are factors. Sort the results and remove any duplicate when the number is a perfect square, and that is the complete factor list, exactly what this factors calculator does automatically.
What are the factors of 24?
The factors of 24 are 1, 2, 3, 4, 6, 8, 12 and 24, which is 8 factors in total. Its prime factorization is 2³ × 3, meaning 24 is built from three 2s and one 3 multiplied together.
What is the difference between factors and prime factors?
Factors are every whole number that divides a number exactly, while prime factors are only the factors that are also prime. 24 has 8 total factors but just 2 distinct prime factors, 2 and 3, since every other factor of 24 (like 4, 6, 8 and 12) is itself a product of those two primes.
How many factors does a prime number have?
Exactly two: 1 and the number itself. That two-factor rule is the definition of a prime number, and it is also the fastest way to check primality once you have the full factor list, which is what this calculator flags with a Yes or No for every number you enter.
Why do perfect squares have an odd number of factors?
Because one factor pairs with itself instead of with a different number. For 36, the pair 6 and 6 only contributes one entry to the list instead of two, which is why 36 has 9 factors (an odd count) rather than an even number like most non-square numbers have.
What is the largest number this factors calculator can handle?
It accurately handles whole numbers up to 1,000,000,000,000 (one trillion). Since the search only runs up to the square root of the number, even numbers in the billions are computed almost instantly in your browser.