Skip to main content
Viva Calculator

Prime Factorization Calculator – Find Prime Factors

Find prime factors and divisors of any number

Find Prime Factors

Method and source check

Last checked:

Editorial check of method and sources; this is not professional review or advice.

Method

The calculator accepts an integer from 2 through 999,999,999,999. It repeatedly divides by 2 and then by odd candidates up to the square root of the remaining value, producing the prime powers, positive divisors, divisor count, and divisor sum.

n = ∏pᵢᵃⁱ

d(n) = ∏(aᵢ + 1)

σ(n) = ∏((pᵢ^(aᵢ + 1) − 1) / (pᵢ − 1))

Variables and units

pᵢ
a distinct prime factor
aᵢ
the exponent of that prime factor
d(n) / σ(n)
number / sum of positive divisors

Worked example

360 = 2³ × 3² × 5. It has (3 + 1)(2 + 1)(1 + 1) = 24 positive divisors, whose sum is 15 × 13 × 6 = 1,170.

Limitations

Prime factors, exponents, divisor count, and divisors are exact integers for accepted inputs; the divisor sum is displayed as a whole number. No decimal precision or trailing-zero formatting is applied.

  • Only positive integers in the displayed range are accepted. Trial division can take longer for large prime inputs near the upper limit; the result does not constitute a cryptographic primality certificate.
  • Input 360 returns 2³ × 3² × 5, 24 positive divisors, divisor sum 1,170, and isPrime false.
  • Input 13 returns prime factor 13, two positive divisors [1, 13], divisor sum 14, and isPrime true.
  • Inputs below 2, above 999,999,999,999, or with a fractional part fail validation; the form accepts integers only.

Sources

How to Use

  1. Enter a positive integer (2 or greater)
  2. Click calculate to find the prime factorization
  3. View the prime factors and their exponents
  4. See the exponential form and all divisors
  5. Check if the number is prime

What is Prime Factorization?

Prime factorization is the process of finding which prime numbers multiply together to make the original number. Every positive integer greater than 1 can be uniquely expressed as a product of prime numbers (Fundamental Theorem of Arithmetic).

For example, 60 = 2 × 2 × 3 × 5 = 2² × 3 × 5

What are Prime Numbers?

A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself. The first few prime numbers are:

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, ...

Note that 2 is the only even prime number. All other even numbers are divisible by 2.

How to Find Prime Factors

  • Start with the smallest prime number (2)
  • Divide the number by 2 as many times as possible
  • Move to the next prime number (3, 5, 7, ...)
  • Continue until the quotient is 1
  • The prime factors are all the primes used in division

Divisor Formulas

For a number n = p₁^a₁ × p₂^a₂ × ... × pₖ^aₖ:

  • Number of divisors: (a₁+1) × (a₂+1) × ... × (aₖ+1)
  • Sum of divisors: [(p₁^(a₁+1) - 1)/(p₁-1)] × ... × [(pₖ^(aₖ+1) - 1)/(pₖ-1)]
  • Product of divisors: n^(d(n)/2) where d(n) is the number of divisors

Applications of Prime Factorization

  • Finding GCD (Greatest Common Divisor) and LCM (Least Common Multiple)
  • Simplifying fractions
  • Cryptography and security (RSA encryption)
  • Number theory and mathematical proofs
  • Computer science algorithms
  • Solving Diophantine equations
  • Music theory and harmony

Frequently Asked Questions

Is 1 a prime number?
No, 1 is not considered a prime number. By definition, a prime number must have exactly two distinct positive divisors: 1 and itself. The number 1 only has one divisor (itself), so it doesn't qualify as prime.
Why is prime factorization unique?
The Fundamental Theorem of Arithmetic states that every integer greater than 1 can be represented uniquely as a product of prime numbers, up to the order of the factors. This uniqueness is fundamental to number theory.
How do I find the GCD using prime factorization?
To find the GCD of two numbers, find their prime factorizations, then multiply together the common prime factors using the lowest exponent for each. For example, GCD(12, 18) = GCD(2²×3, 2×3²) = 2¹×3¹ = 6.
What's the largest known prime number?
The largest known primes are Mersenne primes of the form 2^p - 1. As of recent records, the largest known prime has over 24 million digits. Finding large primes is an active area of mathematical research.