Prime Factorization Calculator
This prime factorization calculator expresses a positive whole number as a product of primes, showing both repeated factors and exponent notation. It accepts integers from 2 through 1,000,000,000,000 and identifies whether the original number is prime or composite.
By Dr. Hassan Khames EliwaLast updated
Result
- Expanded factors
- 2 × 2 × 2 × 3 × 3 × 5
- Number of prime factors
- 6
- Classification
- Composite
How it works
Divide until only prime building blocks remain
A prime number is an integer greater than one with exactly two positive divisors: one and itself. A composite number has additional divisors and can be split into smaller integer factors. Prime factorization continues that splitting until every remaining factor is prime. Apart from rearrangement, the resulting prime factors are unique.
The calculator first divides out every factor of two. It then tries odd divisors in increasing order, repeatedly removing each divisor that fits exactly. Once the next trial divisor is greater than the square root of the remaining number, any remainder greater than one must itself be prime. This stopping rule avoids searching pointlessly up to the original input.
Read repeated factors and powers differently
A compact expression such as 2^3 means three copies of two multiplied together. It does not mean two multiplied by three. The expanded display writes each copy separately, making it easier to check how many factors were found. The factor count includes repetitions; the number of distinct primes would be a different quantity.
This decomposition is useful when simplifying fractions, finding common denominators, or investigating repeated grouping. To compare two quantities, factor each one and compare the exponents attached to matching primes. Common factors use the smaller matching powers, while a common multiple needs the larger powers across the inputs.
Respect the input and performance boundary
Enter ordinary digits without commas, decimal points, or scientific notation. Leading zeros are permitted within the thirteen-character limit, but they do not change the value. Negative values are not supported; this page factors positive integers rather than adding a separate sign factor.
The upper limit is one trillion. Every accepted value is safely represented as an exact integer by the calculator's numeric type, and the trial-divisor loop has a practical fixed ceiling. The tool deliberately does not accept every possible safe integer, because exact representation alone does not make trial division fast enough for a responsive page.
Zero has no finite prime factorization, and one is neither prime nor composite. Both are rejected instead of being assigned misleading factors. For cryptographic-sized integers, this method and its input boundary are inappropriate; use specialist number-theory software rather than trying to bypass validation.
Worked example
Example 1: Breaking down a batch quantity
A stock quantity is 360 pieces. Enter 360. Repeated division gives three factors of two, two factors of three, and one factor of five. The compact result is 2^3 × 3^2 × 5. The expanded result is 2 × 2 × 2 × 3 × 3 × 5, the factor count is 6, and the classification is Composite. Multiplying 8 × 9 × 5 reconstructs the original 360 and provides a quick independent check.
Example 2: Checking a prime-sized group
Enter 97 to investigate whether a group can split into equal nontrivial subgroups. No prime divisor at or below its square root divides evenly. The compact and expanded displays both show 97, the prime-factor count is 1, and the classification is Prime. This does not mean 97 has only one positive divisor; it means its prime factorization contains one prime factor.
Expert tips
Common mistakes
- Counting only distinct prime names understates the reported factor count. For 360 there are three distinct primes, but six prime factors when multiplicity is included.
- Assuming a large odd number is prime skips the actual divisibility work. Odd numbers can have factors such as three, five, seven, or larger primes even when two does not divide them.
- Pasting a rounded spreadsheet display can factor the wrong integer. Obtain the complete stored whole number first, especially when the spreadsheet shows exponent notation or hides trailing digits.
Frequently asked questions
Why is one rejected?
One is the multiplicative identity and has no prime factors. Treating it as prime would destroy the usual uniqueness of prime factorization by allowing unlimited extra factors of one.
Can I factor a negative integer?
Not in this form. Factor its positive magnitude within the stated range, then keep the negative sign separately if your algebraic problem requires it.
What does the caret mean?
The caret indicates a power. For example, 3^2 means 3 × 3. It is plain-text exponent notation, not an instruction to multiply three by two.
Why stop at one trillion?
The cap keeps straightforward trial division bounded and interactive. Larger exact integers can require much more work even when the browser can represent them safely.
Is factorization the same as listing divisors?
No. Prime factorization lists only prime building blocks with multiplicity. A divisor list also includes products of those blocks, plus one and the original integer.
Related calculators
Related guides
MathPercentages people get wrong: change, difference and pointsThe denominator determines the answer. Learn to distinguish percentage change, symmetric difference and percentage-point movements.14 November 2026 · 7 min read
MathStandard deviation without the jargonThe average tells you the centre. Standard deviation helps describe the spread, provided you know what the data represents.14 November 2026 · 7 min readSources and standards
About the author
Dr. Hassan Khames Eliwa holds a PhD in Construction & Built Environment and has more than 20 years of international project controls experience. He is Director of Eliwa Project Controls Limited in Auckland and founder of PMMilestone.org and PMMilestone.com.
Buy me a coffee