How prime factorization is calculated
Enter one whole number. The result writes its absolute value as a product of primes, with repeated primes shown as exponents.
Distinct primes counts each prime once. Prime factors with repeats counts every factor, so 12 has 3. When that count is from 2 to 8, the expanded product lists every factor. 1 has no prime factors. 0 has no result.
How to use this calculator
- Enter a whole number.
- Read the prime factorization.
- The rows below are the distinct primes, the count with repeats, and the expanded product when it is short.
Prime factorization
n is the absolute value. p and q are primes. a and b are how many times each prime appears.
An exponent of 1 is omitted. 1 is not written as a product of primes. 0 has no prime factorization.
Source
Every integer greater than 1 has one prime factorization, up to the order of the factors, as stated on the Wikipedia page on the fundamental theorem of arithmetic.
Worked examples
Example: 12
12 = 2 × 2 × 3, written 2² × 3. Distinct primes: 2. Prime factors with repeats: 3.
Example: 360
360 = 2³ × 3² × 5. Distinct primes: 3. Prime factors with repeats: 6.
What to keep in mind
The number can be a whole number from −1,000,000,000,000 to 1,000,000,000,000. 13 is prime, so the factorization is 13. 1 has no prime factors, and both counts are 0. 0 has no result. −12 has the same factorization as 12, which is 2² × 3. A completed result, including the number you factor, can be stored in this browser’s local history and never leaves your device. Clear it with the history Clear action or by clearing site data.
Common questions about prime factorization
What is the prime factorization of 12?
2² × 3, which is 2 × 2 × 3. There are 2 distinct primes and 3 prime factors with repeats.
What is the prime factorization of 360?
2³ × 3² × 5. There are 3 distinct primes and 6 prime factors with repeats.
What about a prime, 1, or 0?
13 is prime, so the factorization is 13. 1 has no prime factors. 0 has no result.
Do signs matter?
No. −12 has the factorization 2² × 3, the same as 12.
What counts as a whole number?
An integer from −1,000,000,000,000 to 1,000,000,000,000. A decimal such as 1.5 has no result.
Does this calculator store my number?
A completed result can be saved in this browser’s local history, including the number you factor. It stays on your device and is not sent to our servers or to analytics. Clear it with the history Clear action or by clearing site data.