Prime Factorization Calculator

This tool finds the prime factorization of an integer and shows the work step by step using a division chain, then groups repeated factors into powers. Enter $n$ (negatives are allowed) to factorize $|n|$ and, when needed, show the result as $-1$ times the factorization. For more number-structure topics, explore Number Theory.

Escribe un entero como producto de factores primos.

Solo valores enteros. No se admiten decimales.

What Is Prime Factorization?

Prime factorization writes an integer as a product of prime numbers. For any integer $n \gt 1$, the factorization is unique (up to the order of the factors). Results are usually shown in power form, like $2^3 \cdot 3^2 \cdot 5$, which is compact and easy to read.

Why Prime Factorization Matters

Prime factors help you understand a number’s structure and make many number theory tasks easier. For example, primes tell you whether a number is factorable at all, and shared prime factors explain why numbers have a nontrivial GCD.

  • Prime vs composite: confirm whether a number has nontrivial factors using the Prime Checker.
  • Common factors: relate factorizations to the GCD Calculator when comparing two integers.

How Prime Factorization Is Calculated

The calculator factors $|n|$ by repeatedly dividing by small primes. Each successful division is recorded as a division chain (for example, $84 = 2 \cdot 42$). After the chain is built, repeated primes are collected into powers to produce the final compact form.

$$n=\prod p_i^{e_i}$$

Input Rules and Edge Cases

  • Negative input: the tool factors $|n|$ and reports the result as $-1$ times the factorization.
  • $n=1$: has no prime factors, so the factorization is $1$.
  • $n=0$: prime factorization is not defined.
  • Very large integers: results can exceed safe integer range in the browser.

Worked Examples With Steps

Example 1: Composite number with powers

Factor a composite number and collect repeated primes into powers.

Find: $$360$$

Division chain: $$360 = 2\cdot 180$$ $$180 = 2\cdot 90$$ $$90 = 2\cdot 45$$ $$45 = 3\cdot 15$$ $$15 = 3\cdot 5$$

Collect factors: $$360 = 2\cdot 2\cdot 2\cdot 3\cdot 3\cdot 5$$ $$360 = 2^3\cdot 3^2\cdot 5$$

So: $$360 = 2^3\cdot 3^2\cdot 5$$

Example 2: Prime input

If $n$ is prime, its prime factorization is itself.

Find: $$97$$ Since $97$ is prime: $$97 = 97$$

Example 3: Negative input

The tool factors $|n|$ and includes a factor of $-1$ in the final result.

Find: $$-84$$ Work with: $$|{-84}|=84$$

Division chain: $$84 = 2\cdot 42$$ $$42 = 2\cdot 21$$ $$21 = 3\cdot 7$$

Collect factors and apply the sign: $$84 = 2^2\cdot 3\cdot 7$$ $$-84 = -1\cdot 2^2\cdot 3\cdot 7$$

Example 4: $n=1$

The number $1$ has no prime factors.

Find: $$1$$ So: $$1 = 1$$

Keep exploring Mathematics or jump back to Calculators to browse more tools.

Preguntas sobre la calculadora de factorización prima

Respuestas rápidas sobre factores primos, potencias y casos especiales.

Con la confianza de miles de usuarios cada mes: herramientas rápidas, precisas y respetuosas con la privacidad.