Prime Factorization Calculator

Prime Factorization Calculator

Write a whole number as a product of primes, with the successive-division steps a student would use on a factor tree.

Quick AnswerDivide by the smallest prime that fits, repeat, and stop when the remaining piece is prime. Then collect repeats as exponents. 84 ÷ 2 = 42, 42 ÷ 2 = 21, 21 ÷ 3 = 7, and 7 is prime, so 84 = 2^2 × 3 × 7.
84 = 2^2 × 3 × 7





Enter a whole number. 0 cannot be factored. 1 is neither prime nor composite.


Prime factorization
2^2 × 3 × 7
Prime?No
Distinct primes3
Factors with repeats4




Steps

  1. 84 ÷ 2 = 42.
  2. 42 ÷ 2 = 21.
  3. 21 ÷ 3 = 7.
  4. 7 is prime, so it stays as a factor.
  5. Collect like factors: 84 = 2^2 × 3 × 7.

Rate This Tool

Your feedback helps us improve SolverCalc.

No public ratings yet






Select a star to save your rating on this device.

Embed Prime Factorization Calculator

Copy this iframe code into a page that permits embeds.


All calculations run locally in your browser. Your entered values are not sent to an external service.

How to Use the Prime Factorization Calculator

Enter a whole number and select Factor. The tool divides by 2, then by odd primes, writes each successful division as a step, and collects repeated primes as exponents.

  1. Enter the integer you want to factor. Negatives are allowed.
  2. Select Factor to see the product of primes and the division list.
  3. Read Prime? to see whether the number itself is prime.

This is the same method as a factor tree, written as a column of divisions instead of branches. The GCD and LCM Calculator can use these factors, but it does not need them: the Euclidean algorithm finds a gcd without listing primes.

The Successive-Division Method

n = p₁^e₁ × p₂^e₂ × … × pₖ^eₖ

The fundamental theorem of arithmetic says every integer greater than 1 has exactly one prime factorization, up to the order of the factors. To find it, divide by the smallest prime that goes in evenly, replace n with the quotient, and repeat. When the remaining value is prime, you are done.

Writing 2 × 2 × 3 × 7 as 2^2 × 3 × 7 is only bookkeeping. The exponent counts how many times that prime appeared. Checking the product of the prime powers is a useful last step on paper.

Prime Factorization Examples

84

84 is even, so divide by 2 to get 42, then 21. 21 is divisible by 3, leaving 7, which is prime. So 84 = 2 × 2 × 3 × 7 = 2^2 × 3 × 7. There are three distinct primes and four prime factors if repeats are counted.

A prime: 13

No prime at most √13 (which is a little more than 3) divides 13. The number is already prime, so the factorization is 13 itself.

360

360 = 2 × 180 = 2 × 2 × 90 = 2 × 2 × 2 × 45, then 45 = 3 × 15 = 3 × 3 × 5. Collected, 360 = 2^3 × 3^2 × 5. This is the factorization you use when finding lcm(360, 48) from prime powers instead of the Euclidean algorithm.

The number 1

1 is not prime (a prime has exactly two distinct positive divisors, 1 and itself) and not composite. The empty product is sometimes used in higher algebra, but school courses treat 1 as having no prime factorization. This tool reports that fact instead of inventing a factor.

A negative

−84 factors as −(2^2 × 3 × 7). Primality is a property of positive integers greater than 1, so −84 is not called prime.

Primes, 1, and 0

A prime has exactly two positive divisors. 2 is the even prime; every larger even number has 2 as a factor. 0 is divisible by every integer, so it cannot be written as a finite product of primes. This calculator rejects 0 and explains 1 rather than forcing a product.

The tool trials primes up to the square root of the remaining value. That is enough: if a composite number had only prime factors larger than its square root, the product of two such factors would exceed the number.

Common Factoring Mistakes

Stopping at a composite leftover

If the last piece is 9, 15, or 25, keep dividing. The leftover must be prime.

Calling 1 a prime

1 has only one positive divisor. Primes need two: 1 and the number itself.

Forgetting to collect exponents

2 × 2 × 2 is 2^3, not 2 × 3. Counting copies of each prime keeps the unique factorization readable.

Testing only 2 and 3

A number can be 5 × 11 or 7 × 7. After 2, test odd candidates up to the square root.

Saying a negative number is prime

Prime and composite are defined for integers greater than 1. Factor the absolute value and keep the sign on the product.

Prime Factorization FAQs

How do you find a prime factorization?

Divide by the smallest prime that fits, repeat with the quotient, and stop when the remaining number is prime. Then write repeats as exponents.

What is the prime factorization of 84?

84 = 2^2 × 3 × 7.

Is 1 a prime number?

No. 1 is neither prime nor composite and has no prime factorization.

Can 0 be factored into primes?

No. 0 has infinitely many divisors and is excluded from unique factorization.

Does a prime number have a factorization?

Yes: the number itself. A prime is already a product of one prime.

Are my numbers sent to a server?

No. The calculation runs locally in your browser.

Related Calculators

Explore More Number Theory Tools

Continue with divisors, primes, and number-system tools in the SolverCalc collection.

Browse Number Theory & Systems

Reviewed by Prof. Dr. Khalil Mudassar (PhD) · Last updated: [mc_modified_date]

Sources

View references

Disclaimer

This calculator is for general educational use. It uses trial division and is not a cryptographic factoring service. Review important results before relying on them in professional work.