AJ Designer

Prime Factorization Calculator

360 =

2³ × 3² × 5

Solution Details

Standard form
360 = 2³ × 3² × 5
Prime factors with multiplicity
  • 2 (× 3 times)
  • 3 (× 2 times)
  • 5
Classification
360 is a composite number.
Show your work
  1. Factor 360 by trial division:
  2. 360 ÷ 2 = 180
  3. 180 ÷ 2 = 90
  4. 90 ÷ 2 = 45
  5. 45 ÷ 3 = 15
  6. 15 ÷ 3 = 5
  7. 5 ÷ 5 = 1
  8. Final factorization: 360 = 2³ × 3² × 5
Share:

Fundamental Theorem of Arithmetic

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

How It Works

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.

Example Problem

Find the prime factorization of 360.

  1. Start with n = 360 and the smallest prime, 2. Check whether 2 divides 360 evenly: 360 ÷ 2 = 180.
  2. Continue dividing by 2 while it goes in: 180 ÷ 2 = 90, then 90 ÷ 2 = 45. Now 45 is odd, so 2 no longer divides it. Record 2³ (three twos).
  3. Move to the next prime, 3. Check 45 ÷ 3 = 15, then 15 ÷ 3 = 5. Now 5 is not divisible by 3, so record 3² (two threes).
  4. Move to the next prime, 5. Check 5 ÷ 5 = 1. Record 5¹ (one five).
  5. Once the remaining quotient is 1, the algorithm is done. Collecting all the primes gives 360 = 2 × 2 × 2 × 3 × 3 × 5.
  6. Write the result in exponent form: 360 = 2³ × 3² × 5. Verify by multiplying back: 8 × 9 × 5 = 360.

Therefore, the prime factorization of 360 is 2³ × 3² × 5.

Key Concepts

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.

Applications

  • Cryptography: RSA encryption relies on the difficulty of factoring the product of two large primes — easy to multiply, computationally hard to factor back
  • Fractions: simplifying a/b to lowest terms uses the GCD, which is computed by taking minimum prime exponents from both factorizations
  • Common denominators: the LCM used when adding unlike fractions is computed by taking the maximum prime exponent across the two denominators
  • Divisibility: a number is divisible by k exactly when k's prime factorization is a subset of n's factorization (with exponents)
  • Number theory: divisor counts, Euler's totient, the Möbius function, and many other classical functions are computed directly from the prime factorization

Common Mistakes

  • Writing 1 as a prime factor — 1 is neither prime nor composite, and including it would break the uniqueness guarantee of the Fundamental Theorem of Arithmetic
  • Dividing by a prime once and moving on — you must keep dividing by the same prime until it no longer goes in evenly (e.g., 12 = 2 × 2 × 3, not 2 × 6 or 2 × 3 × something)
  • Stopping at the square root and forgetting the remainder — once all divisors up to √n have been checked, if the quotient is still greater than 1, that quotient is itself a prime factor and must be included
  • Using composite divisors — trial division by 4 or 6 will never find a factor that 2 or 3 hasn't already pulled out, so only primes (or just odd numbers after handling 2) need to be checked

Frequently Asked Questions

How do you find the prime factorization of a number?

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.

What is the prime factorization of 360?

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.

Is 1 a prime number?

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.

Why does the algorithm only check divisors up to the square root?

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.

How do you write a prime factorization in exponential form?

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.

What are the prime factors of common numbers like 100, 144, and 1000?

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).

How is prime factorization used to find the GCD and LCM?

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.

Can this calculator handle very large numbers?

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.

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:

n = p₁^a₁ × p₂^a₂ × … × p_k^a_k

Where:

  • n is the positive integer being factored
  • p₁, p₂, …, p_k are distinct prime numbers in increasing order
  • a₁, a₂, …, a_k are positive integer exponents (each prime's multiplicity)

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.

Factor Tree (Example)

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 for 12122623

Factor tree: 12 = 2 × 2 × 3 = 2² × 3. Filled circles are primes (leaves); outlined circles are composite intermediates.

Worked Examples

Highly Composite Number

Factor 360

  • 360 ÷ 2 = 180
  • 180 ÷ 2 = 90
  • 90 ÷ 2 = 45 (now odd, stop dividing by 2 — record 2³)
  • 45 ÷ 3 = 15, then 15 ÷ 3 = 5 (record 3²)
  • 5 ÷ 5 = 1 (record 5¹)

360 = 2³ × 3² × 5

Pure Power of Two

Factor 1024

  • 1024 is even, so divide by 2 repeatedly
  • 1024 ÷ 2 = 512, 512 ÷ 2 = 256, 256 ÷ 2 = 128
  • 128 ÷ 2 = 64, 64 ÷ 2 = 32, 32 ÷ 2 = 16
  • 16 ÷ 2 = 8, 8 ÷ 2 = 4, 4 ÷ 2 = 2, 2 ÷ 2 = 1
  • Counted: ten divisions by 2

1024 = 2¹⁰

Prime Detection

Is 2027 prime?

  • √2027 ≈ 45.02, so check primes up to 45
  • 2027 is odd; not divisible by 3 (digit sum = 11)
  • Not divisible by 5 (does not end in 0 or 5)
  • Trial-divide by 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43 — none divide evenly
  • All primes ≤ √2027 failed, so 2027 itself is prime

2027 is prime

Related Calculators

Related Sites