Skip to main content
HSCalculadora

Prime Factorization Calculator

Break a number into its prime factors.

Results update as you type.

Prime factorization
—
Number of prime factors—

How it works

Prime factorization breaks a whole number down into the prime numbers that multiply together to produce it. A prime number is a whole number greater than one whose only divisors are one and itself, such as 2, 3, 5, 7, and 11. This prime factorization calculator takes any whole number of two or more and returns its unique set of prime factors written as a product, along with a count of how many prime factors it has. The method is simple and systematic: divide the number by the smallest prime that fits, which is often 2, then keep dividing the result by the smallest possible prime until you are left with 1. Each divisor you use is a prime factor. For example, 60 divides by 2 to give 30, again by 2 to give 15, then by 3 to give 5, and 5 is itself prime, so 60 equals 2 times 2 times 3 times 5. The fundamental theorem of arithmetic guarantees that this breakdown is unique for every number: there is exactly one set of prime factors, no matter what order you find them in. Prime factorization is the backbone of many mathematical tasks, including finding the greatest common divisor, simplifying fractions, and identifying least common multiples. It also underlies modern cryptography, where the difficulty of factoring very large numbers keeps data secure. This calculator requires a whole number of at least 2, since 1 and 0 have no prime factorization.

Formula

n = p₁ × p₂ × … × pₖ, each pᵢ prime

Prime factorization expresses a whole number as a product of prime numbers, those greater than one that have no divisors other than one and themselves. The calculator repeatedly divides the number by the smallest prime that goes in evenly, starting at two and working upward, recording each divisor until the number is reduced to one. The fundamental theorem of arithmetic guarantees that every integer above one has exactly one such prime factorization, apart from the order of the factors, so the result is always unique.

Source:Number theory

We review all our tools from time to time to ensure accuracy.

Worked example

Number:60
60 = 2 × 30 = 2 × 2 × 15 = 2 × 2 × 3 × 5, so it has four prime factors.

How to use this calculator

  1. 1

    Enter your values

    Enter number.

  2. 2

    Adjust the options

    Fine-tune any options to match your situation.

  3. 3

    Read your result

    Prime factorization updates instantly as you type — no button to press.

Frequently asked questions

What is a prime number?

A prime number is a whole number greater than one that has exactly two divisors: one and itself. The first few primes are 2, 3, 5, 7, 11, and 13. Numbers with more than two divisors, like 4 or 9, are called composite. The number 1 is neither prime nor composite by definition. Primes are the building blocks of all whole numbers, since every integer above one is a product of primes.

What is the fundamental theorem of arithmetic?

The fundamental theorem of arithmetic states that every whole number greater than one is either prime or can be written as a product of primes in exactly one way, apart from the order of the factors. This guarantees that prime factorization is unique. It is why the factorization the calculator returns is definitive: no other set of primes multiplies to the same number, making it a reliable fingerprint for that value.

How do I do prime factorization by hand?

Start by dividing your number by the smallest prime that goes in evenly, usually 2, then repeat with the quotient, moving up to 3, 5, 7, and so on as needed. Keep dividing until you reach 1, recording each prime divisor. A factor tree is a visual version of the same process. The primes you used, multiplied together, reproduce the original number and form its prime factorization.

What is prime factorization used for?

Prime factorization is used to simplify fractions, find the greatest common divisor and least common multiple of numbers, and reduce radicals. It is essential in number theory and appears in cryptography, where the security of methods like RSA rests on how hard it is to factor very large numbers. In everyday maths it helps with adding fractions and identifying whether two numbers share common factors.

Why can't I factor 1 or 0?

The number 1 has no prime factors because it is not the product of any primes; it is simply the multiplicative identity. Zero cannot be factored into primes either, since no product of primes equals zero. Prime factorization is defined only for whole numbers of 2 or more, which is why this calculator requires an input of at least 2 and returns no factorization below that.