Prime factorization calculator

Enter a nonzero whole number to see its prime factors and their exponents.

Nonzero whole number

Prime factorization

2ยณ ร— 3ยฒ ร— 5

Prime factors with repeats6
Distinct prime factors3

Contents

How the factorization calculator works

A group of twelve dots branching into groups of three, four, and two

Enter a nonzero whole number. The calculator divides it into prime factors and compresses repeated factors into powers; a prime is a number greater than 1 divisible only by 1 and itself.

Read the product, not just the list

The result reconstructs your number exactly. For a negative input, โˆ’1 records the sign separately; it is not prime. The two smaller counts distinguish repeated factors from distinct primes.

n=ฮตโˆi=1kpiai,ฮตโˆˆ{โˆ’1,1}n=\varepsilon\prod_{i=1}^{k}p_i^{a_i},\qquad\varepsilon\in\{-1,1\}

Here each p is a different prime, each exponent a counts its repeats, and ฮต is the sign. To check a result, multiply the displayed powers and include โˆ’1 if needed.

Three useful checks

360: dividing by 2 three times, by 3 twice, and by 5 once gives six factors in total but only three distinct primes.

360=23โ‹…32โ‹…5360=2^3\cdot3^2\cdot5

โˆ’84: factor 84 first, then restore the negative sign. The product has four prime factors with repeats.

โˆ’84=โˆ’1โ‹…22โ‹…3โ‹…7-84=-1\cdot2^2\cdot3\cdot7

97: no integer from 2 through its square-root boundary divides it. Its one-factor decomposition is simply 97. The prime checker gives a direct prime-or-composite verdict.

Why 1 and 0 behave differently

Both 1 and โˆ’1 have no prime factors. Zero is different: every nonzero integer divides it, so there is no unique finite prime product to return.

The input is limited to nonzero integers with absolute value at most 1,000,000,000,000. BigInt arithmetic keeps every accepted factor and exponent exact, without decimal rounding. Trial division may take longer for a large prime than for an even number.

Questions about prime factors

These answers clarify the edge cases before you use a factorization in another calculation.

Is 1 a prime factor?

No. A prime has exactly two positive divisors; 1 has only one.

Why is โˆ’1 shown for a negative number?

It carries the sign of the original integer. It is not counted among the prime factors.

Can I factor zero?

Not into a unique finite product of primes. The calculator therefore rejects zero.

Are the powers rounded?

No. Accepted integers are processed with exact integer arithmetic.

Does this show every divisor?

No. It shows the prime factors and successful division steps, not the full list of divisors.

Similar calculators

You may find the following calculators on the same topic useful:

Share on social media

If you liked it, please share the calculator on your social media platforms. It`s easy for you and beneficial for the project`s promotion. Thank you!