🔢Prime Factorization Calculator

Enter a number to factorize it. Enter a second number to also compute GCD and LCM

How to Use the Prime Factorization Calculator

This prime factorization calculator breaks any positive integer down into its prime components in exponent notation. Enter a number (up to 10,000,000) and the result is instantly displayed — for example, 360 = 2³ × 3² × 5. If the number is already prime, it is labeled "(prime)." Enter a second number to also compute the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of the two numbers.

The GCD is found using the Euclidean algorithm and then the LCM is calculated as LCM = n1 × n2 / GCD. For example, with 12 and 18: GCD = 6, LCM = 36. The prime factorization column confirms the relationship: 12 = 2² × 3 and 18 = 2 × 3², so the GCD shares the minimum exponents (2¹ × 3¹ = 6) and the LCM uses the maximum (2² × 3² = 36).

Prime factorization is fundamental to many areas of math and computing: simplifying fractions, finding common denominators, RSA cryptography, and solving number theory problems all rely on it.

Frequently Asked Questions

What is prime factorization?

It expresses an integer as a product of primes, e.g. 60 = 2² × 3 × 5. Every integer has exactly one prime factorization (Fundamental Theorem of Arithmetic).

How are GCD and LCM found from factorization?

GCD uses the minimum exponent of each shared prime; LCM uses the maximum. This calculator computes them with the Euclidean algorithm for speed.

Is 1 a prime number?

No. By definition, a prime must have exactly two distinct factors (1 and itself). The number 1 has only one factor, so it is neither prime nor composite.