Tools logoTools/
Math & Science/Prime Factorization Calculator

Prime Factorization Calculator

Factor any positive integer into its prime factors and exponents.

Runs locally·Free, no signup·Updated May 6, 2026
Loading tool…
How it works

A walkthrough, end to end.

  1. 1

    Enter any positive integer.

  2. 2

    The calculator returns its prime factorization in two forms: list of factors with exponents (e.g. 2^3 × 3^2) and expanded form.

  3. 3

    Also reports if the number itself is prime.

Reference

Fundamental theorem of arithmetic

Every positive integer > 1 has a unique prime factorization. The calculator uses trial division — efficient for numbers up to ~2^53 (JavaScript Number range).

Use cases

What you can do with this.

Simplifying fractions via prime factors

60/84 → 60 = 2² × 3 × 5, 84 = 2² × 3 × 7. Common factors 2² × 3 = 12. 60/84 = 5/7. Prime factorization gives the systematic approach.

GCF and LCM via prime factors

GCF: take minimum power of each shared prime. LCM: take maximum. e.g., 12 = 2²·3 and 18 = 2·3². GCF = 2·3 = 6. LCM = 2²·3² = 36.

Square root simplification

√72 = √(2³ × 3²) = 2 × 3 × √2 = 6√2. Pull out perfect squares from prime factorization.

Checking divisibility

If number's prime factors include p, then it's divisible by p (and by any product of subsets). Useful for verifying mental arithmetic.

Number theory problems

Many problems reduce to prime structure: counting divisors (use exponents +1, multiplied), Euler's totient, perfect numbers, etc.

Cryptography (RSA)

RSA's security relies on the difficulty of factoring products of large primes. The calculator factors numbers up to ~10^16 quickly; truly cryptographic-sized numbers (~10^617) require specialized algorithms.

Verify if a number is prime

If prime factorization shows just one prime with exponent 1, the number IS that prime. Calculator's output makes this clear.

Prime factorization 2026 — what's current

Trial division remains efficient for numbers up to 10^14. Above that, Pollard rho, quadratic sieve, GNFS used. Calculator handles practical everyday range.

FAQ

Frequently asked.

  • Practically up to ~10^14 (computes in milliseconds). For larger numbers (cryptographic), specialized algorithms outside this calculator are needed.

  • By convention, no — 1 is neither prime nor composite. Prime factorization isn't defined for 1; calculator returns empty for 1.

  • Prime factorization is defined for positive integers. The calculator takes absolute value of negative inputs.

  • No. Calculations run entirely in your browser.