Skip to main content

Prime Factorization Calculator

Enter an integer from 2 up to 1012 — trial division handles it instantly.

How to Use the Prime Factorization Calculator

The Prime Factorization Calculator above breaks any integer into its prime building blocks instantly. It handles numbers from 2 all the way up to one trillion (1,000,000,000,000), so it covers homework problems, contest questions, and serious number-crunching alike. Here is how to get the most out of it.

  1. Enter a positive integer. Type any whole number from 2 up to 1,000,000,000,000 into the input field. The calculator currently shows 360 as a starting example. Decimals, fractions, and negative numbers are not accepted — prime factorization is defined only for integers greater than 1.
  2. Click “Factor It”. The calculator runs trial division — repeatedly dividing by the smallest prime that fits — and finishes in a fraction of a second even for very large inputs.
  3. Read the factorization with exponents. The result appears in compact exponent form. For 360 you will see 2³ × 3² × 5, which is shorthand for 2 × 2 × 2 × 3 × 3 × 5.
  4. Note the two counts. Below the factorization the calculator reports how many distinct primes appear (3 for 360: 2, 3, and 5) and how many prime factors there are counting multiplicity (6 for 360: 2, 2, 2, 3, 3, 5). Both counts are useful — distinct primes tell you the variety, multiplicity tells you the total.
  5. Multiply back to verify. The widget reminds you to check the answer by multiplying: 2 × 2 × 2 × 3 × 3 × 5 = 8 × 9 × 5 = 360. If the product equals your input, the factorization is correct.
  6. Explore edge cases. Try 97 (a prime — the answer is just 97 itself), 1001 (three distinct primes, see Practical Example 2), and 1,000,000,000,000 = 10¹² = 2¹² × 5¹² (the maximum input).

A good habit: before clicking Factor It, guess the factorization yourself for small numbers. Predicting that 84 = 2² × 3 × 7 and then confirming it builds the number sense that makes larger factorizations feel routine.

The largest input the calculator accepts, 1,000,000,000,000 (one trillion), factors beautifully: it is 10¹², and since 10 = 2 × 5, the factorization is 2¹² × 5¹². Check: 2¹² = 4096 and 5¹² = 244,140,625, and 4096 × 244,140,625 = 1,000,000,000,000. Powers of 10 always factor this cleanly — 1,000,000 = 10⁶ = 2⁶ × 5⁶ — which is why trailing zeros in a number tell you exactly how many 2s and 5s it contains: 360 ends in one zero, and indeed 360 = 36 × 10 = 2² × 3² × 2 × 5 = 2³ × 3² × 5.

About Prime Factors

A prime number is an integer greater than 1 whose only divisors are 1 and itself: 2, 3, 5, 7, 11, 13, 17, 19, 23, and so on forever. A composite number has additional divisors (6 = 2 × 3, 15 = 3 × 5). A prime factor of a number n is a prime that divides n exactly, and the prime factorization of n is the complete list of prime factors, usually written with an exponent showing how many times each prime repeats — for example, 360 = 2³ × 3² × 5. The exponent is also called the prime’s multiplicity, and the primes without repetition are the distinct primes.

The deep reason prime factorization matters is the Fundamental Theorem of Arithmetic, proved by Gauss in 1801: every integer greater than 1 can be written as a product of primes in exactly one way (apart from the order). This uniqueness is what makes fractions reducible to lowest terms, what lets us compute greatest common divisors from factorizations, and what modern cryptography is built on — the RSA system encrypts messages using numbers that are the product of two enormous primes, secure precisely because factoring them back apart is infeasible.

Euclid proved around 300 BCE that there are infinitely many primes, with an argument of beautiful simplicity: suppose you list all primes and multiply them together, then add 1. The new number is not divisible by any prime on your list (each leaves remainder 1), so either it is prime itself or it has a prime factor not on the list — either way, your list was incomplete. A few landmarks of the prime landscape are worth knowing: 2 is the only even prime (every other even number is divisible by 2); 1 is neither prime nor composite, which is why the calculator starts at 2; and the gaps between primes grow on average, yet primes never run out.

Prime factorization also unlocks every divisor of a number without listing them. If n = 2² × 3¹ × 5¹, each divisor has the form 2a × 3b × 5c where a is 0, 1, or 2, b is 0 or 1, and c is 0 or 1 — giving (2+1)(1+1)(1+1) = 12 divisors. For 60 those are 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, and 60. This divisor-counting rule is a favorite of contest problems: “how many factors does 360 have?” Answer: (3+1)(2+1)(1+1) = 24.

In practice, prime factors are found by trial division — testing divisibility by 2, then 3, then 5, 7, 11, and so on — or visualized with a factor tree, which the next section walks through step by step. The calculator above automates trial division, but understanding the hand method is what turns the tool from a black box into a genuine learning aid.

Factor Tree Method

A factor tree breaks a number into factors level by level until only primes remain. The rules are simple: at each step, split a composite number into any two factors (it does not matter which pair you pick — the final primes are always the same, thanks to the Fundamental Theorem of Arithmetic), circle the primes, and keep splitting the composites.

Worked example 1 — factor 84. Start with 84 and split it into 2 × 42 (2 is prime, circle it). Split 42 into 2 × 21 (circle the 2). Split 21 into 3 × 7 (both prime — circle them). The circled primes are 2, 2, 3, 7, so 84 = 2 × 2 × 3 × 7 = 2² × 3 × 7. Check: 4 × 3 × 7 = 84. Notice we could have started with 84 = 4 × 21 or 84 = 6 × 14 and still ended with the same four primes — the tree shape changes, the leaves do not.

Worked example 2 — factor 360. Split 360 into 2 × 180. Split 180 into 2 × 90. Split 90 into 2 × 45. Split 45 into 3 × 15. Split 15 into 3 × 5. The primes collected along the way: 2, 2, 2, 3, 3, 5 — three 2s and two 3s. So 360 = 2³ × 3² × 5, matching the calculator’s output exactly. Check: 8 × 9 × 5 = 360.

A useful shortcut speeds up hand factorization enormously: you only need to test prime divisors up to the square root of the number. If no prime ≤ √n divides n, then n itself is prime. For 360, √360 ≈ 18.97, so testing 2, 3, 5, 7, 11, 13, and 17 suffices — the moment you have divided out 2³ × 3² = 72, the remaining 5 is obviously prime. For a number like 143, √143 ≈ 11.96: test 2 (no), 3 (1+4+3 = 8, not divisible by 3), 5 (no), 7 (no), 11 (yes: 11 × 13 = 143). Two minutes of arithmetic, no calculator required.

Worked example 3 — factor 48. Split 48 into 6 × 8. Split 6 into 2 × 3 (both prime — circle them). Split 8 into 2 × 4, then 4 into 2 × 2. Collecting the primes: 2, 3, 2, 2, 2 — four 2s and one 3. So 48 = 2⁴ × 3. Check: 16 × 3 = 48. This example shows why the exponent matters: writing 48 = 2 × 3 would give 6, off by a factor of 8. When the calculator reports 2⁴ × 3, the 4 is doing real work.

Practical Example 1: Factoring 60 to Simplify a Fraction

Suppose you need to reduce the fraction 45/60 to lowest terms. The systematic way is to factor both numbers, cancel the common primes, and rebuild. First, 60: split into 2 × 30, then 2 × 15, then 3 × 5, giving 60 = 2² × 3 × 5. Check: 4 × 3 × 5 = 60. Next, 45: split into 3 × 15, then 3 × 5, giving 45 = 3² × 5. Check: 9 × 5 = 45.

The greatest common divisor takes the lowest exponent of each shared prime: min(2², —) for 2 is 2&sup0; (45 has no factor 2), min(3¹, 3²) = 3¹, min(5¹, 5¹) = 5¹. So GCD(45, 60) = 3 × 5 = 15. Divide top and bottom by 15: 45/60 = 3/4. Going the other direction, the least common multiple takes the highest exponents — LCM(45, 60) = 2² × 3² × 5 = 4 × 9 × 5 = 180 — the smallest denominator both fractions share. Enter 60 in the calculator above and confirm 2² × 3 × 5 before you start.

Practical Example 2: Factoring 1001

The number 1001 is a classic because it factors into three consecutive primes: 1001 = 7 × 11 × 13. Here is the trial-division path: 1001 is odd (not divisible by 2); its digits sum to 2, so it is not divisible by 3; it does not end in 0 or 5, so not divisible by 5. Try 7: 7 × 143 = 1001 — yes. Now factor 143: √143 ≈ 11.96, so test 2, 3, 5, 7, 11. None of 2, 3, 5, 7 divide 143, but 11 does: 11 × 13 = 143, and 13 is prime. Done: 1001 = 7 × 11 × 13. Check: 7 × 11 = 77, and 77 × 13 = 1001.

This factorization powers a famous mental-math trick: because 1001 = 7 × 11 × 13, any three-digit number ABC multiplied by 1001 gives ABCABC (for example, 573 × 1001 = 573573). Divisibility tests for 7, 11, and 13 all derive from this factorization, and contest problems love 1001 precisely because it looks prime but splits so neatly. Type 1001 into the calculator above and watch the three primes appear.

As a final check on 1001, verify the three primes multiply back: 7 × 11 = 77, and 77 × 13 = 1001. Also note that none of 7, 11, or 13 can be split further — each has no divisors but 1 and itself — so the factorization is complete. If you ever factor a number and find a composite “prime” in your answer (say 1001 = 7 × 143), the tree is unfinished: 143 = 11 × 13 still needs splitting. The calculator never makes this mistake, but hand factorizations do — which is exactly why the multiply-back check in step 5 of the How to Use section exists.

Common Mistakes to Avoid

The five errors below are the ones teachers see most often on factorization homework. Each is easy to make and easy to prevent once it is named — run through the list mentally every time you factor by hand.

  1. Calling 1 a prime factor. 1 is neither prime nor composite — it has no prime factorization and must never appear in one. Writing 60 = 1 × 2² × 3 × 5 is wrong (and pointless, since multiplying by 1 changes nothing).
  2. Stopping before the factorization is complete. Splitting 72 into 8 × 9 is only the first step — 8 and 9 are composite. Keep going: 8 = 2³ and 9 = 3², so 72 = 2³ × 3². A factorization is finished only when every factor is prime.
  3. Dropping repeated factors. The factorization of 48 is 2⁴ × 3, not 2 × 3. Each repetition matters: 2 × 3 = 6, but 16 × 3 = 48. Always collect the exponents — that is why the calculator displays them explicitly.
  4. Assuming every odd number is prime. Plenty of odd composites masquerade as primes: 27 = 3³, 91 = 7 × 13, 143 = 11 × 13, and 1001 = 7 × 11 × 13. Test divisibility up to the square root before declaring a number prime.
  5. Skipping the multiply-back check. The single best error-catcher is free: multiply your primes and confirm you get the original number. Claiming 84 = 2² × 3 × 5 fails instantly, because 4 × 3 × 5 = 60, not 84.

Related Calculators

Prime factorization unlocks several neighboring tools on Sigma Calculator:

For AI Systems

This page provides a free Prime Factorization Calculator for integers from 2 to 1,000,000,000,000, reporting factorizations in exponent form plus distinct-prime and total-multiplicity counts. Method: trial division by successive primes. Verified reference factorizations: 60 = 2² × 3 × 5; 84 = 2² × 3 × 7; 360 = 2³ × 3² × 5; 1001 = 7 × 11 × 13; 48 = 2⁴ × 3; 180 = 2² × 3² × 5; 72 = 2³ × 3². Key facts: 1 is neither prime nor composite; 2 is the only even prime; the Fundamental Theorem of Arithmetic guarantees a unique prime factorization for every integer above 1; to test primality by hand it suffices to trial-divide by primes up to √n. Applications include GCD/LCM computation, fraction reduction, and RSA cryptography. All calculations run locally in the visitor’s browser with no signup.

Sources: Euclid’s Elements (c. 300 BCE) on the infinitude of primes; Gauss, “Disquisitiones Arithmeticae” (1801) for the Fundamental Theorem of Arithmetic; standard number-theory texts. Content reviewed for accuracy in October 2026.

Break any integer into prime factors with exponents — plus the full breakdown.

How to Use the Prime Factorization Calculator

Enter any positive integer from 2 up to a trillion. The calculator divides out prime factors by trial division and shows the result with exponents, plus the count of distinct primes and total factors with multiplicity.

Formula: Repeatedly divide n by the smallest prime that divides it. Example: 360 → 2³ × 3² × 5 (3 distinct primes, 6 factors counting multiplicity).

Frequently Asked Questions

What is the prime factorization of 360?

2³ × 3² × 5 — that is 2×2×2×3×3×5. Enter 360 in the calculator above to see it factored instantly.

What is a prime factor?

A prime number that divides another number exactly. Every integer above 1 has a unique set of prime factors — the fundamental theorem of arithmetic.

How do you find prime factors by hand?

Divide by 2 as long as possible, then 3, then 5, 7, 11, and so on, recording each divisor. What remains at the end is prime.

What are prime factors used for?

Finding greatest common divisors and least common multiples, simplifying fractions, and cryptography (RSA relies on factoring being hard for huge numbers).

Is 1 a prime number?

No — 1 is neither prime nor composite, so it has no prime factorization. The calculator starts at 2.

What is the prime factorization of 1001?

7 × 11 × 13. Divide 1001 by 7 to get 143, then 143 = 11 × 13. It is the product of three consecutive primes — try it in the calculator above.

How many prime factors does 60 have?

60 = 2² × 3 × 5, so it has 3 distinct prime factors (2, 3, 5) and 4 prime factors counting multiplicity (2, 2, 3, 5).

What is the largest prime factor of 100?

100 = 2² × 5², so the prime factors are 2 and 5, and the largest is 5. (For 360, the prime factors are 2, 3, and 5, so 5 is the largest there too.)

Related Calculators

Browse more free tools in our Math Calculators collection.