You can write 360 as 36 × 10, 18 × 20, or 8 × 45. Each product is correct. Prime factorization takes the process further until every factor is prime. It produces the same collection of primes regardless of which pair you started with. That makes a prime factorization useful for checking divisibility or comparing the factors of several numbers.
TinyToolbox Prime Factorization Calculator accepts one positive whole number from 2 to 1,000,000,000 and displays its prime factors as a product. When a prime occurs several times, an exponent shows the count. After calculating, multiply the factors back together and check how the answer applies to your original question.
Distinguish primes from other factors
A prime is an integer greater than one with exactly two positive divisors, one and itself. For example, 7 is prime. The integer 21 has additional divisors, including 3 and 7, so it can be broken into smaller factors. A factorization is complete once the remaining factors are prime.
Every integer greater than one has one prime factorization up to the order of the factors. For example, 12 is both 3 × 4 and 2 × 6. Breaking down the composite factors gives the same list either way, two copies of 2 and one copy of 3. Prime factorization records that list rather than the sequence of splits used to find it.
A prime input returns itself because there are no smaller prime factors. For example, an input of 2 gives 2, and an input of 7 gives 7. The number 1 is outside the form’s range. It is neither prime nor composite, and there are no primes to list in its factorization. The form also does not factor negative numbers, zero, or decimal fractions.
Run the factorization in TinyToolbox
- Open Prime Factorization Calculator.
- Type the number under Integer.
- Select Calculate.
- Read the factors, including any exponents.
- Multiply the factors together to check that they give the original number.
Enter plain digits for a whole number. For example, enter 360 without separators or a unit. If the number came from a measurement, decide whether you need to treat that measurement as a whole count in a particular unit. The factorization describes the integer you enter. Changing from centimetres to millimetres, for example, changes that integer and its factors.
Try 360 first. The result is 2^3 × 3^2 × 5. Read 2^3 as three copies of two multiplied together, or eight. Read 3^2 as two copies of three, or nine. Then 8 × 9 × 5 returns 360. Leaving out the exponent would give 2 × 3 × 5, or 30. That smaller product lists the distinct primes but does not reproduce the factorization.
Check the result by dividing out small factors
Start with the smallest prime, two. The number 360 is even, so divide it by two to get 180. Divide again to get 90 and again to get 45. The remaining value is odd. Those three successful divisions account for 2^3.
Next try three. Dividing 45 by three gives 15, and another division gives 5. Five is prime, which completes the factorization. The repeated threes account for 3^2, and the remaining five appears once. You can also begin by splitting 360 into 36 and 10. Factoring both parts and collecting their primes gives the same result.
The tool tries two and then odd divisors as long as a trial divisor’s square does not exceed the remaining number. The stopping rule follows from factor pairs. If a remaining integer is composite, at least one of its factors is no larger than its square root. Otherwise both factors would be larger and their product would exceed the integer. Once no such divisor remains, a leftover value greater than one is prime.
Use the exponents to check divisibility
Suppose you want to know whether 24 divides 360. The prime factorization of 24 is 2^3 × 3. The factorization of 360 contains at least three copies of two and one copy of three, so it contains everything needed to make 24. Dividing leaves 3 × 5, or 15. You can verify that by multiplying 24 × 15.
Now try 16, which is 2^4. The factorization of 360 contains only three copies of two, so it does not have enough to make 16 as a divisor. The presence of two in the result is insufficient. Check how many times the factor occurs.
A number can have many positive divisors even when it uses few distinct primes. For example, 72 has the factorization 2^3 × 3^2. To form a divisor, choose zero through three copies of two and zero through two copies of three. That makes four choices for the first exponent and three for the second, giving twelve positive divisors. Choosing zero of both primes produces 1. Choosing the highest of both produces 72.
Compare two factorizations to simplify a fraction
To simplify 84/126, factor both integers. The numerator is 2^2 × 3 × 7. The denominator is 2 × 3^2 × 7. Each has at least one copy of two, one copy of three, and one copy of seven. Their product is 42. Divide the numerator and denominator by 42 to obtain 2/3.
When you use prime factors to find a greatest common divisor, take the smaller exponent for each shared prime. A prime present on only one side contributes nothing. If you need the shared divisor directly, Greatest Common Factor Calculator takes the two integers without requiring you to write out the factorization.
For a least common multiple, take the larger exponent for every prime that appears in either number. For 84 and 126, the result uses 2^2 × 3^2 × 7, or 252. It is divisible by both starting numbers. Least Common Multiple Calculator can verify that result independently. Keeping these two rules separate helps avoid taking the larger exponent when you need something that divides both inputs.
Verify the result before applying it
Check a prime input such as 97 and a composite input such as 72. The first returns a single prime. The second returns 2^3 × 3^2, and multiplying those powers produces 8 × 9, or 72. If a result needs to be used in a later calculation, record the original integer alongside the powers so you can check whether an exponent was copied correctly.
Finally, distinguish the product of prime factors from a list of all divisors. The result shows how the number is built from primes. To answer a separate question about grouping, divisibility, or fraction reduction, use the relevant combination of those factors and check your answer against the original quantities.
Compare two intervals with a common starting point
Suppose one maintenance check repeats every 72 hours and another every 90 hours. Both were completed at noon today. To find the first time they next fall due together, factor each interval in the Prime Factorization Calculator. The results are 72 = 2³ × 3² and 90 = 2 × 3² × 5.
A shared due time has to be a multiple of both intervals. For each prime, take the highest exponent appearing in either factorization. Here that gives 2³ × 3² × 5 = 360 hours. Divide 360 by the original intervals to check the result. It is five intervals of 72 and four of 90. With the given starting time, 360 hours is 15 days later. The two checks meet again at noon if the schedule is measured in elapsed hours and there is no local clock change to account for.
Taking the smallest exponents would produce the greatest common divisor, which is 18 hours in this example. That can serve as a shared unit for describing the intervals, since 72 is four groups of 18 and 90 is five groups of 18. The next shared due time requires a length both intervals divide into, so use the larger powers for that problem. If the checks started at different times, knowing their common repeat interval alone would not establish their first shared due time.
Build a list of divisors from a factorization
Try entering 84. Its prime factorization is 2² × 3 × 7. Each positive divisor arises by choosing an exponent from zero through the available exponent for each prime. For 2, choose 0, 1, or 2. For 3 and 7, choose 0 or 1 each. An exponent of zero contributes a factor of one. Multiplying the selected powers gives one divisor. For example, 2¹ × 3⁰ × 7¹ gives 14, and 2² × 3¹ × 7⁰ gives 12.
There are three choices for the exponent of 2 and two choices each for the other primes. That gives 3 × 2 × 2 = 12 divisors, including 1 and 84. List them in pairs to check the count. The pairs are 1 and 84, 2 and 42, 3 and 28, 4 and 21, 6 and 14, and 7 and 12. Each pair multiplies to the original number. If you need possible group sizes above a specified minimum, build the divisor list first and apply that minimum afterward.
For a square such as 36, a divisor pair can use the same number twice. Factor 36 as 2² × 3². This gives nine positive divisors. In the pairs, 6 appears as 6 × 6, so count it once when listing distinct divisors. That is why a square can have an odd number of divisors even though divisor pairs are a convenient way to enumerate them.
Check a factor tree that takes a different path
You can begin a factor tree for 180 with 18 × 10 or with 12 × 15. With the first split, 18 gives 2 × 3 × 3, and 10 gives 2 × 5. With the second split, 12 gives 2 × 2 × 3, and 15 gives 3 × 5. Sorting the leaves produces 2, 2, 3, 3, and 5 in both cases. The calculator’s compact form is 2² × 3² × 5.
If your tree gives 2² × 9 × 5, the product is correct and the factorization needs one more step. Split 9 into 3 × 3. If your tree gives 2 × 3² × 5, multiplying reveals 90 rather than 180. That points to a missing factor of 2. Checking the product and checking that every base is prime catches both kinds of error.
When a leftover factor looks prime, check small candidates up to its square root. If the leftover had a factor larger than its square root, the matching smaller factor would be below that square root. For example, when checking 29, its square root is a little above 5. The relevant prime divisors to try are 2, 3, and 5, and none divides it. When checking 49, include 7 at the boundary. This confirms that 49 still has a split even though the trial factors below 7 fail.