Prime Factorization Calculator
360 =
Solution Details
- 2 (× 3 times)
- 3 (× 2 times)
- 5
- Factor 360 by trial division:
- 360 ÷ 2 = 180
- 180 ÷ 2 = 90
- 90 ÷ 2 = 45
- 45 ÷ 3 = 15
- 15 ÷ 3 = 5
- 5 ÷ 5 = 1
- Final factorization: 360 = 2³ × 3² × 5
Every integer greater than 1 can be written as a unique product of prime powers (up to the order of the factors). Prime factorization is the process of finding those primes and their exponents.
n = p₁^a₁ × p₂^a₂ × … × p_k^a_k
Prime factorization breaks a positive integer down into the prime numbers that multiply together to make it. The standard school method is trial division: starting at 2, divide the input by each prime as many times as it goes in evenly, then move on to the next prime. You can stop checking once the candidate divisor exceeds the square root of what's left, because any remaining factor must itself be prime. The result is a list of primes with multiplicities — for example, 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5.
Find the prime factorization of 360.
Therefore, the prime factorization of 360 is 2³ × 3² × 5.
A prime number is an integer greater than 1 whose only positive divisors are 1 and itself (2, 3, 5, 7, 11, 13, …). A composite number is any integer greater than 1 that is not prime — equivalently, any integer with at least two distinct prime factors when counted with multiplicity. The number 1 is special: it is neither prime nor composite, and its prime factorization is the empty product. The Fundamental Theorem of Arithmetic guarantees that the prime factorization of any integer > 1 is unique up to the order of the factors, which is what makes prime factorizations useful for computing GCDs (take the minimum exponent of each shared prime), LCMs (take the maximum exponent of each prime in either number), and for reducing fractions to lowest terms.
Start with the smallest prime, 2, and divide the number by it as many times as it goes in evenly. Move to the next prime (3, then 5, then 7, …) and repeat. Once your candidate divisor exceeds the square root of what's left, the remaining quotient (if greater than 1) is itself a prime factor. The list of primes you collected, each raised to the number of times it divided, is the prime factorization.
360 = 2³ × 3² × 5 = 2 × 2 × 2 × 3 × 3 × 5. There are three 2s, two 3s, and one 5 — verify by multiplying: 8 × 9 × 5 = 360.
No. By modern convention 1 is neither prime nor composite. Excluding 1 from the primes is what makes the Fundamental Theorem of Arithmetic work — if 1 counted, you could multiply by 1 any number of times and uniqueness would fail.
If n has any factor pair a × b = n, the smaller of a and b must be at most √n. So once you have checked every potential divisor up to √n, any remaining factor of n is larger than √n — which means there can be at most one such factor, and that factor must itself be prime.
Group identical primes and write each as a single base raised to the count of how many times it appears. For example, 2 × 2 × 2 × 3 × 3 × 5 becomes 2³ × 3² × 5. Primes that appear only once are usually written without an exponent.
100 = 2² × 5², 144 = 2⁴ × 3², and 1000 = 2³ × 5³. These come up often because they are products of small primes raised to small powers — exactly the pattern you'd expect for round decimal numbers (powers of 10 = 2 × 5).
The GCD of two numbers is the product of each shared prime raised to the minimum of its two exponents; the LCM is the product of every prime that appears in either number raised to the maximum exponent. For example, 12 = 2² × 3 and 18 = 2 × 3²: GCD = 2¹ × 3¹ = 6, LCM = 2² × 3² = 36.
This calculator uses trial division and accepts inputs up to 10¹⁵. Beyond that the algorithm is too slow for the browser — for large semiprimes (numbers that are the product of two big primes, like RSA moduli) you need specialized algorithms such as Pollard's rho or the General Number Field Sieve. For huge inputs reach for Wolfram Alpha or a dedicated computer algebra system.
Reference: Standard prime factorization definition from elementary number theory; the uniqueness statement is the Fundamental Theorem of Arithmetic.
Every integer greater than 1 can be written, in exactly one way (up to ordering), as a product of prime powers:
Where:
For example, 360 = 2³ × 3² × 5 has three primes (2, 3, 5) with exponents (3, 2, 1) — and there is no other way to write 360 as a product of primes.
A factor tree is a visual way to carry out trial division. Start with the number at the top, split off a prime factor at each step, and keep going until every leaf is prime. Reading the leaves left to right gives the prime factorization.
Factor tree: 12 = 2 × 2 × 3 = 2² × 3. Filled circles are primes (leaves); outlined circles are composite intermediates.
Highly Composite Number
360 = 2³ × 3² × 5
Pure Power of Two
1024 = 2¹⁰
Prime Detection
2027 is prime