Calculator and Converter

Prime factorization calculator

Prime factorization breaks a whole number into a product of prime numbers.

Results

Enter your values to see the result.

About this tool

Enter a Number and the calculator writes it out with exponents, such as 2^3 × 3^2 × 5 for 360, and tells you how many prime factors there are with repeats and how many are distinct. It is used in number theory exercises and when simplifying fractions.

How it is calculated
divide repeatedly by the smallest prime factor until nothing is left
Worked example
With Number: 360, the result is: Prime factors: 2^3 × 3^2 × 5; Number of prime factors (with repeats): 6; Distinct prime factors: 3.
Good to know
The Number must be a whole number from 2 up to one trillion. Factors are found by trial division using the smallest primes first. A prime input returns itself as its only factor.

Frequently asked questions

What is the difference between the two counts shown?

Number of prime factors counts repeats, so 360 has six. Distinct prime factors counts each different prime once, so 360 has three: 2, 3 and 5.

What will I see if I enter a prime number?

The Prime factors line shows just that number, the total count is 1 and the distinct count is 1. A prime cannot be broken into smaller primes, so it is its own factorization.

Why is there an upper limit on the Number?

Factoring works by trial division, which takes longer as numbers grow. Capping the input at one trillion keeps the calculation fast and ensures the answer is exact.

Related calculators