HomeCalculatorsMathPrime Factorization Calculator

Prime Factorization Calculator

Math

Find the prime factorisation of any number instantly. Shows all prime factors with their exponents, factor expression, and divisor count with step-by-step working. Free tool.

Number

Enter any integer from 2 to 10,000,000

Prime Factorisation

360 = 360

Distinct Primes

Total Divisors

Is Prime?

Smallest Factor

What is a Prime Factors?

The Prime Factorization Calculator breaks down any positive integer (up to 10,000,000) into its complete prime factorization, displayed in exponential notation such as 2³ × 3² × 5. It also computes the number of distinct prime factors, the total factor count (with multiplicity), the total number of positive divisors, and confirms whether the input itself is a prime number.

Every integer greater than 1 can be written as a unique product of prime numbers — this is the Fundamental Theorem of Arithmetic, one of the cornerstones of number theory. For example, 360 = 2 × 2 × 2 × 3 × 3 × 5, written compactly as 2³ × 3² × 5. This factorization is unique: no other combination of primes multiplies to 360.

Prime factorization is foundational to a wide range of mathematical topics taught in Indian schools and competitive exams: finding HCF and LCM, simplifying fractions, proving irrationality of √2 and √3 (CBSE Class 10), and understanding modular arithmetic. In computer science and cryptography, the computational difficulty of factorizing large numbers is the security basis for RSA encryption used in online banking, HTTPS, and digital signatures.

The GCF & LCM Calculator is a natural companion — it uses prime factorization internally and displays factor chips for both inputs, making it easy to identify common factors and compute GCF and LCM by inspection.

How to use this Prime Factors calculator

  1. Enter the Number — type any positive integer from 2 to 10,000,000 into the input field. The input must be a whole number (no decimals or negative numbers). Large numbers (6–7 digits) are supported and compute in milliseconds.

  2. Read the Prime Factorization — the factor chips display the result in p^e notation. If there is only one chip and the number itself appears (e.g., "7¹"), the input is prime.

  3. Check the "PRIME" badge — if displayed, the input is a prime number and has no prime factors other than itself.

  4. Note the Divisor Count — use this to answer "how many divisors does n have?" type questions. For perfect squares, all exponents are even and the divisor count is always odd.

  5. Use for HCF/LCM — open the GCF & LCM Calculator and enter your two numbers to see their factorizations side by side with the HCF and LCM computed automatically.

Formula & Methodology

Trial Division Algorithm:Divide n by 2 repeatedly to find all factors of 2. Then try all odd numbers d = 3, 5, 7, ... up to √n. For each d that divides n, record d and its count. If the remaining quotient after all trial divisions is > 1, it is itself a prime factor.

Divisor Count Formula:If n = p₁^a₁ × p₂^a₂ × ... × pₖ^aₖ, then:Number of divisors = (a₁ + 1)(a₂ + 1) ... (aₖ + 1)

Primality test: n is prime if no integer from 2 to ⌊√n⌋ divides n.

Worked example — Class 10 CBSE style:

Express 3600 as a product of prime factors and find the number of divisors.

Step 1 — Divide by 2: 3600 → 1800 → 900 → 450 → 225 (4 factors of 2)Step 2 — Divide by 3: 225 → 75 → 25 (2 factors of 3)Step 3 — Divide by 5: 25 → 5 → 1 (2 factors of 5)

Prime factorization: 3600 = 2⁴ × 3² × 5²

Verification: 2⁴ = 16; 3² = 9; 5² = 25; 16 × 9 = 144; 144 × 25 = 3600 ✓

Divisor count = (4+1)(2+1)(2+1) = 5 × 3 × 3 = 45 divisors

Distinct prime factors: 3 (primes 2, 3, and 5)Total prime factors with multiplicity: 4 + 2 + 2 = 8

Assumption: The calculator uses trial division, which is efficient for numbers up to ~10 million. For larger numbers, trial division slows significantly as the trial limit (√n) grows. Numbers are treated as positive integers — negative inputs, zero, and 1 are not valid for prime factorization.
Frequently Asked Questions
What is prime factorization?
Prime factorization is the process of expressing a positive integer as a product of its prime number factors. Since every integer greater than 1 is either prime or can be written as a unique product of primes, this representation always exists and is unique (Fundamental Theorem of Arithmetic). For example, 360 = 2³ × 3² × 5 — every composite number has exactly one prime factorization (ignoring order of factors).
How does the Prime Factorization Calculator work?
Enter any positive integer (up to 10,000,000) and the calculator uses trial division — testing divisibility by 2, then 3, then all odd numbers up to √n — to find all prime factors. It returns the factorization in exponential form (e.g., 2³ × 3² × 5), the number of distinct prime factors, the total count of prime factors including multiplicity, the number of divisors, and whether the input is itself prime.
What is the difference between prime factors and divisors?
Prime factors are the prime numbers in the factorization of n (e.g., 2, 3, 5 for 360). Divisors are all positive integers that divide n exactly, including 1, n itself, and all composite combinations of the prime factors. The number of divisors is computed from the exponents in the prime factorization: if n = p₁^a₁ × p₂^a₂ × ..., then divisor count = (a₁+1)(a₂+1).... For 360 = 2³ × 3² × 5¹, divisor count = (3+1)(2+1)(1+1) = 24.
What is the Fundamental Theorem of Arithmetic?
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 theorem guarantees that the prime factorization of any number is unique — there is only one correct answer for any given input. This uniqueness is what makes prime factorization useful in number theory, cryptography, and computing GCF and LCM.
How is prime factorization used to find GCF and LCM?
To find GCF (HCF): list the prime factorizations of both numbers and take each common prime factor to its minimum exponent. To find LCM: take each prime factor (from either number) to its maximum exponent. For 36 = 2² × 3² and 48 = 2⁴ × 3: GCF = 2² × 3 = 12; LCM = 2⁴ × 3² = 144. For a direct GCF and LCM computation with the verification identity included, use the [GCF & LCM Calculator](/gcf-lcm-calculator/).
Is prime factorization part of the CBSE syllabus?
Yes — prime factorization is first covered in CBSE Class 6 (Chapter 3: Playing with Numbers) and revisited in Class 10 (Chapter 1: Real Numbers) where the Fundamental Theorem of Arithmetic is formally stated and used to prove the irrationality of √2, √3, etc. The Class 10 exam frequently includes questions requiring prime factorization as a step in HCF/LCM computation or in proving that certain numbers are irrational.
What makes a number prime?
A prime number is a positive integer greater than 1 that has no positive divisors other than 1 and itself. The first few primes are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29. The number 2 is the only even prime; all larger primes are odd. A number that has more than two divisors (1, itself, and at least one other factor) is composite. The number 1 is neither prime nor composite by convention.
How do I check if a large number is prime?
To test whether n is prime, check divisibility by all primes up to √n. If no prime up to √n divides n, then n is prime. For n = 97: √97 ≈ 9.85, so test primes 2, 3, 5, 7. None divide 97, so 97 is prime. For large numbers (thousands of digits), probabilistic primality tests like Miller-Rabin are used instead. Our calculator supports numbers up to 10,000,000 and uses trial division to determine primality.
What is the prime factorization of 1?
The number 1 has no prime factorization — it is the multiplicative identity and is defined as neither prime nor composite. The Fundamental Theorem of Arithmetic applies to integers greater than 1. Entering 1 into the calculator returns no prime factors (empty factorization) and confirms it is not prime. This is consistent with the convention that the empty product equals 1.
Why is prime factorization important in cryptography?
Modern public-key cryptography (RSA encryption) relies on the fact that multiplying two large prime numbers is computationally easy, but factorizing the resulting product back into its two prime factors is computationally infeasible for sufficiently large numbers (hundreds of digits). This asymmetry — easy multiplication, hard factorization — is the security basis for RSA. The largest publicly factored numbers have hundreds of digits, and no efficient classical algorithm exists for factorizing general large integers.
What is the smallest prime factor of any even number?
The smallest prime factor of any even number (except 2 itself) is always 2. This is because even numbers are divisible by 2 by definition. In the trial division algorithm, testing divisibility by 2 first is the most efficient starting point since it immediately handles half of all integers. After dividing out all factors of 2, the remaining quotient is odd and trial division continues with odd divisors only.