Factor numbers up to a trillion into primes, with grouped and expanded forms, factor counts, and the full working shown.
Prime Factorization Calculator
Factor any whole number into primes — grouped form, expanded form, and every factor count in one run.
Enter your values
Fill in the fields below — the result appears with every step shown.
Your result will appear here
Enter your values above, then press Calculate — or press Enter in any field.TinyExe · Prime Factorization Result
Calculated locally in your browser
—
Name
—
Number to factor
—
Input 2
—
Result
—
How this was calculated
What to do next
TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.
Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.
The short answer
Prime factorization writes a number as a product of primes only. For example, 192 divided by 2 six times leaves 3, so 192 equals 2 to the power 6 times 3, which is seven prime factors counting repeats. Similarly, 39 equals 3 times 13, both of which are prime.
- 192 = 2^6 x 3
- 39 = 3 x 13
- Every integer > 1 has exactly one prime factorization
Factorizations of common numbers
Reference values for this calculator.
| Number | Prime factorization | Total factors (with multiplicity) |
|---|---|---|
| 12 | 2^2 x 3 | 3 |
| 36 | 2^2 x 3^2 | 4 |
| 100 | 2^2 x 5^2 | 4 |
| 192 | 2^6 x 3 | 7 |
| 360 | 2^3 x 3^2 x 5 | 6 |
The formula
The exact formula this calculator uses — every variable in it is explained in the card below.
The formula
Every integer above 1 factors into primes in exactly one way. This tool trial-divides by 2, then odd candidates up to the square root of what remains — fast for numbers up to a trillion. Ideas enhancement: as well as the grouped factorization it reports the expanded product, the total factor count with multiplicity (big Omega), the distinct prime count and the largest prime factor, the four numbers factor-based questions usually ask for next.
Worked examples
Worked examples with the full working shown — try them in the calculator to check.
Example 1
Factorizing 192
n = 192
| Calculation | Steps |
|---|---|
| 192 / 2 = 96, / 2 = 48, / 2 = 24, / 2 = 12, / 2 = 6, / 2 = 3, and 3 is prime. Six 2s and one 3. | 192 = 2^6 x 3 — 7 prime factors with multiplicity, largest prime factor 3. |
Result
Example 2
Factorizing 39
n = 39
| Calculation | Steps |
|---|---|
| 39 is odd, digit sum 12 so divisible by 3: 39 / 3 = 13, and 13 is prime. | 39 = 3 x 13 — 2 prime factors. |
Result
Example 3
Factorizing 360
n = 360
| Calculation | Steps |
|---|---|
| 360 / 2 = 180, / 2 = 90, / 2 = 45; 45 / 3 = 15, / 3 = 5; 5 is prime. Three 2s, two 3s, one 5. | 360 = 2^3 x 3^2 x 5 — 6 prime factors with multiplicity. |
Result
How to use this calculator
Step 1
Enter a whole number of 2 or more (up to a trillion).
Step 2
Press Calculate.
Step 3
Read the grouped factorization, e.g. 192 = 2^6 x 3.
Step 4
Use the detail cards for the expanded product, largest prime factor and factor counts.
Frequently asked questions
What is prime factorization?
Writing a number as a product of prime numbers only. For example 192 = 2 x 2 x 2 x 2 x 2 x 2 x 3, written compactly as 2^6 x 3. Every whole number above 1 has exactly one prime factorization.
What is the prime factorization of 192?
192 = 2^6 x 3: divide by 2 six times (192, 96, 48, 24, 12, 6, 3) and the remaining 3 is prime. That is 7 prime factors counted with multiplicity.
What are the factors of 39?
39 = 3 x 13, both prime, so its prime factorization is 3 x 13 and its full factor list is 1, 3, 13, 39.
Is 1 a prime number?
No. 1 is neither prime nor composite — it has only one factor. Prime factorization starts at 2, the smallest prime.
Why does the calculator stop checking at the square root?
If a number has a factor larger than its square root, the matching co-factor is smaller than the square root and would already have been found. Once trial division passes sqrt of the remainder, what is left must be prime.
About this calculator
The Prime Factorization Calculator breaks a whole number down into the prime numbers that multiply together to make it. The result is shown grouped with exponents (192 = 2^6 x 3), expanded as a full product, and summarised with factor counts and the largest prime factor.
A prime number has exactly two factors: 1 and itself. Composite numbers are built from primes multiplied together, and the Fundamental Theorem of Arithmetic guarantees the recipe is unique — 360 is always 2^3 x 3^2 x 5, never anything else. That uniqueness is why factorization underpins fraction simplification, HCF/LCM shortcuts and RSA cryptography.
The practical method is trial division: test divisibility by 2, then by odd numbers 3, 5, 7, and so on, keeping each divisor and continuing with the quotient. You can stop when the trial divisor exceeds the square root of the remaining quotient, because any larger factor would need a smaller partner you have already tested.
Two counts are worth distinguishing. The distinct count (little omega) counts each prime once — 192 has 2 distinct primes. The total count with multiplicity (big Omega) counts repeats — 192 has 7, because 2 appears six times. Exam questions specify which they want; this calculator reports both so there is no guessing.
Use it for school maths (factors, HCF/GCF and LCM work), simplifying fractions and radicals, checking whether a number is prime, and the first step of many number-theory and cryptography exercises.
How to calculate it yourself
Step 1
Start with the number and divide by the smallest prime that divides it exactly.
Step 2
Write down that prime and repeat with the quotient.
Step 3
Continue through primes 2, 3, 5, 7, ... up to the square root of the current quotient.
Step 4
When the quotient is prime (or 1 after the last division), stop.
Step 5
Group repeated primes with exponents to write the final factorization.
Real-life examples
Simplifying a big fraction
A student must simplify 192/360. Instead of guessing common factors, she factorizes both numbers first.
192 = 2^6 x 3 and 360 = 2^3 x 3^2 x 5. Cancel shared primes: 2^3 x 3 cancels, leaving 2^3 / (3 x 5) = 8/15.
192/360 simplifies to 8/15, found mechanically with no missed factors.
Checking a "prime" claim
A puzzle book claims 91 is prime. A quick factorization check settles it.
91 is not divisible by 2, 3 or 5, but 91 / 7 = 13 exactly, so 91 = 7 x 13.
91 is composite — the claim is wrong, and the factors are 7 and 13.
Ideas & use cases
- Find the HCF of two numbers by factorizing both and multiplying the shared primes at their lowest powers — factorize 192 and 360 to get HCF 24.
- Simplify square roots: pair up prime factors; sqrt(192) = sqrt(2^6 x 3) = 2^3 x sqrt(3) = 8 sqrt(3).
- Test primality quickly: if the calculator returns the number itself as a single factor, it is prime.
Limitations & sources
- Trial division is instant up to about 10^12; very large semiprimes (cryptographic sizes) would need Pollard rho methods and are out of scope. Inputs must be whole numbers of 2 or more.
Sources: Fundamental Theorem of Arithmetic — standard number theory (e.g. Hardy & Wright, An Introduction to the Theory of Numbers); trial division to sqrt(n)
