Tip: commas and spaces are okay (e.g., 1,234,567).
What is prime decomposition?
Prime decomposition (also called prime factorization) is the process of writing a whole number as a product of prime numbers. A prime number has exactly two positive divisors: 1 and itself. For example, 2, 3, 5, and 7 are prime.
If you decompose 360, you get: 360 = 23 × 32 × 5. This representation is unique (up to ordering), which is why it is so useful across mathematics.
How to use this calculator
- Enter any integer in the input field.
- Click Calculate or press Enter.
- View the factorized form, number classification, and division steps.
The calculator supports positive and negative integers. For negatives, it includes -1 in the decomposition.
Why prime decomposition matters
1) Simplifying fractions
Prime factors make it easy to cancel common terms. For instance, to reduce 84/126, factor both numbers and remove shared primes.
2) Finding GCD and LCM
Greatest common divisor and least common multiple are easiest to compute with prime exponents:
- GCD: take the lower exponent of each shared prime.
- LCM: take the higher exponent of each prime used.
3) Number theory and cryptography
Factoring integers sits at the heart of modern number theory. In cryptography (especially RSA), the difficulty of factoring very large numbers is a foundational security assumption.
Quick examples
- 72 = 23 × 32
- 231 = 3 × 7 × 11
- 9973 is prime, so its decomposition is just itself.
Algorithm used in this page
This calculator uses straightforward trial division:
- First divide out factors of 2.
- Then test odd divisors (3, 5, 7, ...).
- Stop once divisor² exceeds the remaining value.
This is perfect for everyday math and educational use. Extremely large integers may take longer, as expected for any simple factorization approach.
FAQ
Is 1 prime?
No. The number 1 is neither prime nor composite, and it has no prime decomposition.
Can zero be factored into primes?
No. Zero does not have a prime factorization.
Does order matter in prime decomposition?
No. 2 × 2 × 3 × 5 and 3 × 2 × 5 × 2 represent the same factorization. We usually write factors in ascending order.