Number Theory & Precision · Formula v1.0

Prime Factorization Calculator

Calculate the number of distinct prime factors and the largest prime factor of a value.

Every whole number greater than 1 has a unique prime factorization. At the worked-example inputs, the distinct prime factors is 3. Prime factorization writes a number as a product of primes with exponents. On the example, 360 is 2 cubed times 3 squared times 5, with 3 distinct primes and 5 as the largest. It reveals every divisor of the number, its number of divisors, its GCF and LCM with another number, and whether it is a perfect square: all exponents even. Use it to simplify roots and fractions. The method is quick by hand for small numbers, but a factor tree can hide repeated primes. It returns distinct prime factors, largest prime factor.

FreeNo sign-upInputs stay in-browserCSV exportReviewed August 28, 2026
LAST REVIEWEDAugust 28, 2026Inputs stay in your browser
Live calculation

Enter your numbers

Calculated result
Distinct prime factors3
Largest prime factor5
Sensitivity check

What if value changes?

-10% input2
0% input3
+10% input3

Transparent method

The formula

Repeated division by the smallest prime that divides the value

Worked example

Distinct prime factors3
Largest prime factor5

Example inputs

Value360

How to interpret the result

Every whole number greater than one breaks down into exactly one unique combination of prime factors, a foundational fact the rest of number theory builds on, which means two different-looking factorizations of the identical number are never both correct. One of them has an error somewhere.

Before you rely on it

What to check

Multiply the listed prime factors back together and confirm the product matches the original number exactly.

The common error

Where people go wrong with prime factorization calculator

Assuming a number could have more than one valid prime factorization. The uniqueness of prime factorization is a proven mathematical fact, so two different factor lists for the same number mean one of them is wrong, not that both are valid.

Sensitivity evidence

How value changes the distinct prime factors

Prime Factorization Calculator: distinct prime factors and largest prime factor across a range of value, every other input held at the worked-example value.
ValueDistinct prime factorsLargest prime factor
28823
32423
360worked example35
396311
43223

Step by step

The worked example, input by input

Worked-example inputs and the results they produce for the prime factorization calculator.
InputValue used
Value360
Distinct prime factors3
Largest prime factor5

Where the inputs come from

Enter a whole number greater than 1. The calculator repeatedly divides by the smallest prime that goes in, and reports the number of distinct prime factors and the largest one. Prime factorization is unique for every number apart from the order of the factors. Very large numbers take longer, and factoring numbers with hundreds of digits is infeasible, which is what makes some encryption secure.

When the result stops applying

Perfect powers and highly composite numbers have many factors. Prime numbers factor only as themselves. Reporting only distinct primes loses the exponents, so write the full factorization when solving problems.

What to compare it with

Check primality on the prime number calculator, find common factors on the GCF and LCM page, and simplify fractions on the fraction simplifier. The root calculator uses factorization to simplify square roots, and the factorial page shows products of many primes. The modulo calculator tests divisibility.

People also ask

Frequently asked questions

What is prime factorization?

Writing a number as a product of prime numbers, such as 360 equals 2 times 2 times 2 times 3 times 3 times 5.

Is the prime factorization of a number unique?

Yes. Apart from the order of the factors, every whole number greater than 1 has exactly one prime factorization.

How can I tell if a number is a perfect square from its factors?

It is a perfect square if every prime appears an even number of times in its factorization.

Common number theory & precision questions

Sources and evidence