Math calculators

Prime Factorization Calculator

Updated Nov 24, 2026 By Infinity Calculator Formulas Sources
Rate
Supports integers and expressions with +, -, *, /, ^, and parentheses.
Computing...
Factorizing...

Prime Factorization Results

Input Number

84,000

Distinct Prime Factors

4

Total Divisors

96

Exponential Form
25 × 3 × 53 × 7
Product Form
2 × 2 × 2 × 2 × 2 × 3 × 5 × 5 × 5 × 7
Prime Factors
2 3 5 7
All Divisors (96)
Factor Tree

Introduction

Prime factorization is the process of breaking a number down into the smallest prime numbers that multiply together to give you that number. For example, the prime factorization of 12 is 2 × 2 × 3, because those prime numbers multiply to equal 12. Every whole number greater than 1 can be written as a product of primes, and there is only one way to do it.1 This is known as the Fundamental Theorem of Arithmetic.

Our Prime Factorization Calculator makes this process quick and simple. Just enter a whole number greater than 1, and the tool will find its prime factors for you. This is useful for simplifying fractions, finding the greatest common factor (GCF), calculating the least common multiple (LCM), or just learning how numbers are built from their basic parts.

How to Use Our Prime Factorization Calculator

Enter any whole number greater than 1, and this calculator will break it down into its prime factors. You will see the results in exponential form and product form, the number of divisors with a full list when there are 500 or fewer, and an optional factor tree diagram for numbers with up to 50 prime factors.

Enter a Number or Expression: Type the whole number you want to factorize into the input field. You can enter a simple number like 84000 or a math expression using +, -, *, /, ^, and parentheses. For example, typing 2^64 - 1 will calculate that value first and then find its prime factors. You can enter numbers of up to 1,000 digits. If a number has prime factors too large to find quickly, the calculator tells you so instead of showing a result.

Number Base: Choose whether your input is in Decimal (base 10) or Hexadecimal (base 16). Most users should leave this set to Decimal. Select Hexadecimal if you are working with hex numbers. In Hexadecimal mode, every number you type is read as hex, including each number in an expression, and the factors and divisors are shown in hex.

Show Factor Tree: Check this box if you want to see a visual factor tree diagram that shows how your number splits into prime factors step by step. This is helpful for learning how prime factorization works.

Verbose Output: Check this box to see a detailed step-by-step breakdown of every division performed during the factorization process. Each step shows which number was divided, what it was divided by, and the result.

Calculate Button: Click this button after entering your number to run the calculation. The results will appear below, showing the input number, the number of distinct prime factors, the total count of divisors, the exponential form, the product form, a list of all prime factors, and a list of every divisor of your number when there are 500 or fewer.

What Is Prime Factorization?

Prime factorization is the process of breaking a number down into the set of prime numbers that multiply together to give that number. A prime number is a number greater than 1 that can only be divided evenly by 1 and itself.2 Examples of prime numbers include 2, 3, 5, 7, 11, and 13.3 Every whole number greater than 1 is either a prime number itself or can be written as a product of prime numbers.1 This idea is so important that mathematicians call it the Fundamental Theorem of Arithmetic.

For example, the number 84,000 can be broken down into 2 × 2 × 2 × 2 × 2 × 3 × 5 × 5 × 5 × 7. No matter what method you use, you will always get the same set of prime factors. That is what makes prime factorization unique: every number has exactly one prime factorization.1

How Prime Factorization Works

The simplest method is called trial division.7 You start by dividing the number by the smallest prime, which is 2. You keep dividing by 2 until it no longer goes in evenly. Then you move on to 3, then 5, then 7, and so on. You repeat this process until the remaining number is 1. Each time a prime divides evenly, that prime is one of the factors.1

For very large numbers, trial division can be slow. A number made of two large primes of about the same size can take about as many divisions as its square root.7 In those cases, advanced methods like Pollard's Rho algorithm are used. This algorithm is built to find the smaller factors of a large number. It works through a sequence of numbers and watches for a repeat, which reveals a factor far sooner than testing every possible divisor.7 This calculator uses trial division for smaller factors and automatically switches to Pollard's Rho when dealing with large composite numbers.

Key Terms in the Results

  • Exponential Form: Groups repeated prime factors using exponents. For instance, 2 × 2 × 2 is written as 23.
  • Product Form: Lists every prime factor individually, multiplied together.
  • Divisors: All the numbers that divide evenly into the original number. The total count of divisors is found by adding 1 to each exponent in the exponential form and multiplying those results together.4 For 25 × 31 × 53 × 71, the divisor count is (5+1) × (1+1) × (3+1) × (1+1) = 96, since 6 × 2 × 4 × 2 = 96. The factor tree provides a visual diagram showing how the number splits step by step into its prime building blocks.

Why Prime Factorization Matters

Prime factorization is used throughout math and everyday applications. It is the basis for finding the greatest common factor (GCF) and least common multiple (LCM) of two or more numbers, which helps when simplifying fractions or solving problems with ratios. In computer science, the difficulty of factoring extremely large numbers is what keeps modern encryption and online security systems safe.1 In the RSA encryption method, the public key's modulus is a product of distinct odd primes.6 Multiplying large primes together is easy, but recovering them from the product is extraordinarily hard.

Prime factorization also helps when simplifying square roots, because each pair of equal prime factors under the root can come out as one factor. Knowing how to break a number into its prime factors is a fundamental and powerful skill.


Formulas used

Prime Factorization 1
n = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k}
Total Number of Divisors 4
\tau(n) = (a_1 + 1)(a_2 + 1) \cdots (a_k + 1)
Set of All Divisors
D(n) = \left\{\, p_1^{e_1} p_2^{e_2} \cdots p_k^{e_k} \;\middle|\; 0 \le e_i \le a_i \,\right\}
Miller–Rabin Primality Witness Test 5
n \text{ odd}, \quad n - 1 = 2^r \cdot d \;(d \text{ odd}), \quad a^d \not\equiv 1 \pmod{n} \;\text{ and }\; a^{2^i d} \not\equiv -1 \pmod{n} \text{ for all } 0 \le i < r \;\Rightarrow\; n \text{ composite}
Pollard's Rho Iteration 7
x_{i+1} = (x_i^2 + c) \bmod n, \quad d = \gcd(|x_i - x_j|,\; n)

Frequently asked questions

What is a prime number?

A prime number is a whole number greater than 1 that can only be divided evenly by 1 and itself.2 For example, 2, 3, 5, 7, 11, and 13 are all prime numbers.3 The number 4 is not prime because it can be divided by 2.

What does the exponential form mean?

Exponential form groups repeated prime factors using exponents. Instead of writing 2 × 2 × 2, you write 23. It is a shorter way to show the same prime factorization.

What is the difference between prime factors and divisors?

Prime factors are the prime numbers that multiply together to make your number. Divisors are all the numbers that divide evenly into your number, including 1 and the number itself. For example, the prime factors of 12 are 2 and 3, but the divisors of 12 are 1, 2, 3, 4, 6, and 12.

What is a factor tree?

A factor tree is a diagram that shows how a number breaks apart into prime factors step by step. At the top is the original number. Each level splits a composite number into two factors until only prime numbers remain at the bottom. It is a helpful visual way to understand the factorization process.

Why is 1 not a prime number?

By definition, a prime number must have exactly two distinct divisors: 1 and itself.2 The number 1 only has one divisor (itself), so it does not meet the definition.1 Excluding 1 from the primes also keeps prime factorization unique, since otherwise any number could be written with extra factors of 1.3 The Fundamental Theorem of Arithmetic says that every whole number greater than 1 has exactly one prime factorization, apart from the order of the factors.1

Is 2 the only even prime number?

Yes. The number 2 is the only even prime number. Every other even number can be divided by 2, so none of them can be prime. This makes 2 special in number theory.

What is Pollard's Rho algorithm?

Pollard's Rho is a fast method for finding the smaller factors of a large number.7 It works through a sequence of numbers and watches for a repeat, which reveals a divisor without testing every possible number.7 This calculator uses it automatically when trial division would be too slow.

How is the total number of divisors calculated?

Take the exponential form of the prime factorization. Add 1 to each exponent, then multiply those results together.4 For example, if a number equals 23 × 52, the divisor count is (3+1) × (2+1) = 12.


Sources

  1. Kirk D. Contemporary Mathematics, 3.1 Prime and Composite Numbers. OpenStax. 2023;section 3.1. Accessed September 28, 2026.
  2. NIST Digital Library of Mathematical Functions, 27.1 Special Notation. National Institute of Standards and Technology. section 27.1. Accessed September 28, 2026.
  3. A000040 The prime numbers. The OEIS Foundation. A000040. Accessed September 28, 2026.
  4. A000005 d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n. The OEIS Foundation. A000005. Accessed September 28, 2026.
  5. National Institute of Standards and Technology. Digital Signature Standard (DSS), FIPS 186-5. National Institute of Standards and Technology. 2023;Appendix B.3.1, Miller-Rabin Probabilistic Primality Test, pp. 57-58. Accessed October 8, 2026.
  6. Moriarty K, Kaliski B, Jonsson J, Rusch A. RFC 8017: PKCS #1: RSA Cryptography Specifications Version 2.2. Internet Engineering Task Force. 2016;Section 3.1, RSA Public Key. Accessed October 8, 2026.
  7. Menezes AJ, van Oorschot PC, Vanstone SA. Handbook of Applied Cryptography, Chapter 3: Number-Theoretic Reference Problems. CRC Press. 1996;Sections 3.2.1-3.2.2, Algorithm 3.9, Fact 3.11 and Note 3.12, pp. 90-92. Accessed November 24, 2026.