How to Find Factors of a Number (Step by Step)
By Shihab Mia August 3, 2026 7 min read
Quick answer
To find the factors of a number, test every whole number from 1 up to its square root. Whenever your number divides evenly by one of those test values, you have found a pair of factors at once: the test value and the number divided by it. For example, to factor 24 you only need to check 1 through 4 (since the square root of 24 is about 4.9), which gives the pairs 1x24, 2x12, 3x8, and 4x6, meaning the full list of factors is 1, 2, 3, 4, 6, 8, 12, 24.
A factor of a number is any whole number that divides it with no remainder left over. Every positive integer has at least two factors, 1 and itself, and most have several more in between. Finding them by brute force, checking every integer up to the number itself, works but wastes a lot of time on larger numbers. The square root shortcut below cuts that work roughly in half by exploiting a simple fact: factors always come in matching pairs that multiply back to the original number.
What does it mean to "find the factors" of a number?
Finding the factors of a number means listing every positive integer that divides into it evenly, with a remainder of zero. Factors are also called divisors, and the two words mean exactly the same thing. If you divide 24 by 5, you get 4.8, a remainder, so 5 is not a factor of 24. Divide 24 by 6, though, and you get exactly 4 with nothing left over, so both 6 and 4 are factors of 24.
Factors always show up in pairs. If a number i divides n evenly, then n divided by i is also a whole number, and that quotient is a factor too. This pairing is the entire idea behind the fast method: instead of checking every number up to n, you only need to check up to the square root of n, because past that point every new factor you would find is just the pairing partner of one you already found.
The fastest method: trial division up to the square root
This is the method to use for finding a complete, accurate factor list by hand. It works for any positive integer and never misses a factor.
- Estimate the square root of your number (it does not need to be exact, just round up to the nearest whole number).
- Starting at 1, test each whole number i up to that square root.
- If n divided by i comes out even (no remainder), record both i and n divided by i as factors.
- Once you pass the square root, stop. You already have every factor, just sort the pairs into one list.
Worked example: find all the factors of 24. The square root of 24 is approximately 4.9, so you only need to test i = 1, 2, 3, and 4.
Finding the factors of 24 by testing up to the square root
| Test divisor (i) | 24 divided by i | Even split? | Factor pair found |
|---|---|---|---|
| 1 | 24 | Yes | 1 and 24 |
| 2 | 12 | Yes | 2 and 12 |
| 3 | 8 | Yes | 3 and 8 |
| 4 | 6 | Yes | 4 and 6 |
Combine and sort every value from that table and you get the complete list: 1, 2, 3, 4, 6, 8, 12, 24, which is 8 factors in total. Notice you never had to check 5, 6, 7, all the way to 24. Testing stopped at 4 because 5 squared is 25, already past 24, so any factor larger than 4 was guaranteed to already be captured as the pairing partner of a smaller one.
Finding factors through prime factorization
A second reliable approach is prime factorization: break the number down into the prime numbers that multiply together to build it, then combine those primes in every possible combination to generate the full factor list. This method is slower for listing every factor of a single number, but it is the better choice when you also need the greatest common factor of two numbers, or when you want to understand a number's underlying structure rather than just its divisor list.
To prime factorize 24, keep dividing by the smallest prime that fits until only a prime is left.
Prime factorization of 24 step by step
| Step | Division | Result |
|---|---|---|
| 1 | 24 divided by 2 | 12 |
| 2 | 12 divided by 2 | 6 |
| 3 | 6 divided by 2 | 3 (prime, stop) |
That gives 24 = 2 x 2 x 2 x 3, or written with exponents, 2 cubed times 3. Every factor of 24 is some combination of those prime building blocks: 1 (no primes used), 2, 3, 4 (2x2), 6 (2x3), 8 (2x2x2), 12 (2x2x3), and 24 (2x2x2x3), the same eight factors found through trial division. If a number's prime factorization already looks familiar and you just need to check whether one of those building blocks itself is prime, our guide on what is a prime number covers that definition directly.
How many factors does a number have? (A shortcut formula)
You can predict exactly how many factors a number has without listing a single one, using its prime factorization. Take each prime's exponent, add 1 to it, then multiply those results together. For 24 = 2 cubed x 3 to the first power, the exponents are 3 and 1, so the factor count is (3 + 1) x (1 + 1) = 4 x 2 = 8, which matches the eight factors found above.
Predicting the total number of factors from prime factorization
| Number | Prime factorization | Exponents + 1 | Total factors |
|---|---|---|---|
| 24 | 2^3 x 3^1 | (3+1) x (1+1) | 8 |
| 36 | 2^2 x 3^2 | (2+1) x (2+1) | 9 |
| 60 | 2^2 x 3^1 x 5^1 | (2+1) x (1+1) x (1+1) | 12 |
| 17 | 17^1 | (1+1) | 2 |
This formula is handy for checking your work: if trial division gives you a different total than the formula predicts, you missed a factor pair somewhere and should recheck your divisions.
Special cases worth knowing
Two categories of numbers behave predictably enough that recognizing them saves you a full trial division pass.
- Prime numbers have exactly two factors. A prime number, like 17, divides evenly by only 1 and itself, nothing else. If trial division up to the square root turns up no even splits at all, the number is prime, and you already know its complete factor list without further checking.
- Perfect squares have an odd number of factors. Every other number has an even factor count, since factors pair up neatly, but a perfect square like 36 has one pair where both members are identical (6 x 6), so that pair only contributes one value instead of two, leaving an odd total. That is why 36 has 9 factors instead of an even number.
- 1 is a factor of every number, and every number is a factor of itself. These two are the trivial factors and are easy to forget when listing results by hand.
Common mistakes to avoid
Factoring is straightforward once you know the square root shortcut, but a few slip-ups come up often.
- Testing every number up to n instead of up to the square root. This still gives a correct answer but wastes significant time on larger numbers; always stop testing once your divisor passes the square root.
- Forgetting to record both factors in a pair. When i divides n evenly, both i and n divided by i are factors. It is easy to jot down only the smaller value and miss its partner.
- Double counting the middle pair of a perfect square. For a number like 36, when i = 6 divides evenly you get 36 divided by 6 = 6, the same value twice; count it once, not twice.
- Confusing factors with multiples. Factors of a number are smaller than or equal to it and divide into it; multiples are the results of multiplying it by whole numbers and grow larger. They are opposite directions entirely.
- Assuming a large number must be composite (or prime) without checking. Some numbers that look complicated are prime, and some that look simple have many factors; the only reliable way to know is to run the trial division test.
Find every factor instantly
If you would rather skip the manual division, enter any whole number below and get the complete factor list in one click, along with the prime factorization. It is especially useful for larger numbers where checking every value up to the square root by hand gets tedious.
โ Try the free tool Factors Calculator Free factors calculator. Enter a whole number to find every factor, its prime factorization, factor count, and whether it is prime or a perfect square.Once you know the square root shortcut, finding the factors of any whole number becomes fast and reliable: test up to the square root, record each pair as you find it, and stop as soon as you pass that point. Prime factorization and the exponent-plus-one formula are useful companions when you need to understand a number's structure or double check your total count, but the trial division method alone is all you need for a complete, correct list every time.
Frequently asked questions
What are the factors of 24?
The factors of 24 are 1, 2, 3, 4, 6, 8, 12, and 24, eight factors in total. You find them by testing whole numbers from 1 up to the square root of 24 (about 4.9): 1x24, 2x12, 3x8, and 4x6 are the four pairs that multiply back to 24.
What is the fastest way to find all the factors of a number?
Test every whole number from 1 up to the square root of your number, and whenever one divides evenly, record both it and the resulting quotient as a factor pair. You never need to check past the square root, since every larger factor is just the pairing partner of a smaller one you already found.
How do you find the prime factors of a number?
Repeatedly divide the number by the smallest prime that fits evenly, replacing it with the quotient each time, until only a prime number is left. For example, 24 divided by 2 three times gives 3, so the prime factorization of 24 is 2 x 2 x 2 x 3, or 2 cubed times 3.
How many factors does a number have?
Write the number's prime factorization, add 1 to each prime's exponent, then multiply those results together. For 24 = 2 cubed x 3 to the first power, that is (3+1) x (1+1) = 8, matching the eight factors found by direct testing.
Why does a perfect square have an odd number of factors?
Factors normally pair up (like 4 and 6 for 24), giving an even total, but a perfect square has one pair where both numbers are identical, such as 6 x 6 for 36. That repeated pair contributes only one unique value instead of two, leaving an odd factor count overall.
What is the difference between a factor and a multiple?
A factor divides evenly into a number and is always smaller than or equal to it, while a multiple is the result of multiplying that number by a whole number and grows larger. For 24, the factors include 6 and 8, while the multiples include 48 and 72; they describe opposite relationships.