Prime Factorization Calculator
Enter a number to see its prime factorization
Result
How it is calculated
The tool uses trial division. It tries each divisor d from 2 upward, divides the number by d as many times as it goes in evenly and counts how many times, then moves on. It stops when d × d is larger than what is left; any remainder above 1 is itself a prime. The result is shown as a product with exponents, as the list of every factor written out, and as the count of distinct primes.
The input must be a whole number of 2 or more. Decimals such as 1.5, negative numbers, 0 and 1 give no result because they have no prime factorization. A value like 360.0 is accepted as 360. Very large numbers become slow, and from 2⁵³ (9,007,199,254,740,992) upward the tool gives no result, because a number that large cannot be held exactly.
Worked example
Factor 360. Divide by 2: 180, 90, 45, so 2 goes in three times and leaves 45. Divide by 3: 15, then 5, so 3 goes in twice and leaves 5. Since 5 is larger than the remaining search limit, 5 is prime itself. The compact form is 2³ × 3² × 5, with 3 distinct primes, and written out in full it is 2 × 2 × 2 × 3 × 3 × 5. Check: 8 × 9 × 5 = 360.
Common mistakes
- Entering 1 and expecting a factorization. 1 is not a prime and has no prime factors, so the tool shows nothing.
- Counting the factor list instead of the distinct primes. The count shows how many different primes appear (3 for 360), not the number of factors written out (6).
- Mixing up prime factors with all divisors. 360 has many divisors, such as 4, 6 and 12, but only 2, 3 and 5 are prime.
- Entering 9,007,199,254,740,992 (2⁵³) or more and expecting a factorization. The tool stops there and shows no result, because such a number cannot be held exactly.
- Typing a number with a thousands separator or a decimal part and expecting it to be read; only plain whole numbers work.
Sources
- 2.5 Prime Factorization and the Least Common Multiple — OpenStax, Prealgebra 2e
About this calculator
This calculator breaks any whole number down into its prime factors using trial division — testing 2, 3, 5, 7 and onward until only primes remain — and shows both the expanded product and the compact exponent form (like 2³ × 3² × 5).
Math students use it to check factoring homework, and prime factorization is the foundation of topics like finding the GCD/LCM of numbers and the basic number theory that underlies public-key cryptography like RSA.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
Factorizations give you the greatest common divisor and least common multiple directly. Take 360 = 2³ × 3² × 5 and 84 = 2² × 3 × 7: the GCD uses the smallest exponent of shared primes, 2² × 3 = 12, and the LCM uses the largest of every prime, 2520. Inputs of 2⁵³ (about nine quadrillion) or more give no result rather than a rounded one. What do you need the factors for?