Prime Factorization Calculator: Factors
Every whole number bigger than 1 is either prime — divisible only by 1 and itself — or composite, built by multiplying primes together. Prime factorization breaks a number down into those prime building blocks, and the result is unique: no matter how you factor a number, you always get the same primes. That uniqueness is the fundamental theorem of arithmetic.
Enter any whole number from 1 to 1 trillion and this calculator shows its prime factors, the exponent form, how many prime factors it has, and whether the number is prime.
Prime factorization of 360
How It Works
This calculator factors by trial division: it tries dividing by 2, then by each odd number in turn, and every time a divisor is found it divides it out and keeps going with what is left. For 360: divide by 2 three times (360 → 180 → 90 → 45), then by 3 twice (45 → 15 → 5), and 5 is prime — so 360 = 2³ × 3² × 5.
Only divisors up to the square root need testing. If a number had a factor bigger than its square root, the matching factor would be smaller than the square root — and it would already have been found. So when the trial divisor passes √n with nothing left but a number bigger than 1, that remainder is itself prime. That is also how the calculator spots primes: 97 has no divisor up to √97 ≈ 9.8 (only 2, 3, 5 and 7 need testing), so 97 is prime.
The result is shown two ways. The exponent form groups repeated factors with powers — 360 = 2³ × 3² × 5 — and the expanded form lists every factor — 2 × 2 × 2 × 3 × 3 × 5. The table also counts the prime factors with multiplicity (360 has 6) and the distinct primes (360 has 3: 2, 3 and 5). Multiply the factors back together and you always get the original number — that is the check that the factorization is right.
Worked Example
360 = 2³ × 3² × 5. Divide by 2 three times (360 → 180 → 90 → 45), then by 3 twice (45 → 15 → 5), and 5 is prime. Expanded: 2 × 2 × 2 × 3 × 3 × 5. Check: 8 × 9 × 5 = 360. There are 6 prime factors counting repeats, and 3 distinct primes.
97 is prime. Its square root is about 9.8, so only 2, 3, 5 and 7 need testing — none of them divides 97, so 97 has no factors other than 1 and itself. The calculator says so explicitly rather than showing a bare "97".
100 = 2² × 5² (2 × 2 × 5 × 5, check: 4 × 25 = 100) and 1000 = 2³ × 5³ (2 × 2 × 2 × 5 × 5 × 5, check: 8 × 125 = 1,000). Powers of 10 always factor into 2s and 5s, because 10 = 2 × 5.
Assumptions
- Whole numbers from 1 to 1,000,000,000,000 (1 trillion). Decimals, fractions and letters are rejected with a clear message.
- 1 has no prime factors. 1 is neither prime nor composite, so the calculator says so explicitly instead of showing an empty result.
- 0 and negative numbers are rejected. 0 has no prime factorization — every prime divides 0, so there is no unique list of prime factors. Prime factorization is defined for positive integers.
- Trial division, exact results. Every factor shown is exact — no rounding is involved. The 1-trillion cap keeps the worst case at 1,000,000 trial divisions, which runs in well under a second.
Sources: No external data is used on this page — every figure is calculated from the number you enter, using trial division up to the square root. Last reviewed: 15 November 2026.
Built and tested by SumKitTool — see how we check our numbers.
How to Use This Calculator
Enter a whole number and the factorization appears as you type. The headline shows the exponent form — for example 2³ × 3² × 5 for 360 — and the table shows the expanded form, the number of prime factors counting repeats, the number of distinct primes, and whether the number is prime. Reset restores 360.
Try the worked examples: 97 shows "97 is a prime number", 100 gives 2² × 5², and 1,000 gives 2³ × 5³. Try 1 to see the special message, and try a large prime such as 999983 — the calculator tests divisors up to 999 and confirms it is prime.
Tips and Practical Advice
A few divisibility shortcuts speed up factoring by hand. Even numbers divide by 2. If the digits add up to a multiple of 3, the number divides by 3 (360: 3 + 6 + 0 = 9, so yes). Numbers ending in 0 or 5 divide by 5. And 2 is the only even prime — every other even number is composite.
Primes get rarer as numbers grow, but they never run out — Euclid proved over two thousand years ago that there are infinitely many. Between 1 and 100 there are 25 primes; between 1,000,000 and 1,000,100 there are only 6.
Prime factorization is the engine behind the GCF and LCM: the GCF takes the lowest power of each shared prime, and the LCM takes the highest power of each prime that appears. Factoring first makes both of those calculations transparent. To find the GCF of two numbers directly, use the GCF calculator.
Frequently Asked Questions
What is prime factorization?
It is writing a number as a product of prime numbers. For example 360 = 2 × 2 × 2 × 3 × 3 × 5, written in exponent form as 2³ × 3² × 5. Every whole number bigger than 1 has exactly one prime factorization — the fundamental theorem of arithmetic.
Is 1 a prime number?
No. 1 is neither prime nor composite: a prime must have exactly two distinct factors (1 and itself), and 1 has only one factor. So 1 has no prime factors at all — this calculator says so rather than giving an empty answer.
How do you know if a number is prime?
Test whether any prime up to its square root divides it. For 97, √97 is about 9.8, so only 2, 3, 5 and 7 need testing — none divides 97, so 97 is prime. This calculator uses trial division up to √n, which is fast for numbers up to 1 trillion.
What is the largest number this calculator accepts?
1,000,000,000,000 (1 trillion, 10¹²). Trial division checks divisors up to the square root, so the worst case is 1,000,000 trial divisions — fast in a browser. Larger numbers would need a different algorithm, so they are turned away with a clear message.
Last updated: