Prime Factorization Calculator
The prime factorization calculator breaks any whole number up to one trillion into prime factors, showing the factor tree step by step – and tells you whether the number is prime.
Source: Wolfram MathWorld – Prime factorization. Updated: .
How it is calculated
Prime factorization writes a number as a product of primes: 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. By the fundamental theorem of arithmetic, every whole number from 2 upwards has exactly one such factorization, apart from the order of the factors.
How to find the prime factors
- Divide by the smallest prime that goes in exactly: 360 ÷ 2 = 180.
- Repeat with the result: 180 ÷ 2 = 90, 90 ÷ 2 = 45, 45 ÷ 3 = 15, 15 ÷ 3 = 5.
- Stop when what is left is prime (5). Group repeated factors as powers.
Divisibility rules speed this up: 2 if the last digit is even, 3 if the digit sum is divisible by 3, 5 if it ends in 0 or 5. You only need to test primes up to the square root – if none divides, the number is prime.
What prime factorization is used for
- GCF and LCM: shared factors with the lowest or highest power – see the GCF and LCM calculator.
- Simplifying fractions and finding common denominators in the fraction calculator.
- Simplifying radicals: √360 = √(2² × 3² × 10) = 6√10, step by step in the square root calculator.
Number and sum of divisors
The exponents give the number of divisors directly: (3 + 1)(2 + 1)(1 + 1) = 24 divisors for 360. The calculator also shows the sum of all divisors and lists them when there are not too many.
Frequently asked questions
How do you do prime factorization?
Keep dividing by the smallest prime that fits until a prime is left: 84 ÷ 2 = 42, 42 ÷ 2 = 21, 21 ÷ 3 = 7, so 84 = 2² × 3 × 7.
Is 1 a prime number?
No. A prime has exactly two factors, 1 and itself; 1 has only one. The smallest prime is 2, which is also the only even prime.
How can I tell if a number is prime?
Try dividing by all primes up to its square root. If none divides evenly, it is prime. For 97, √97 ≈ 9.8 and 2, 3, 5, 7 all fail – so 97 is prime.
How many factors does a number have?
Add 1 to each exponent in the prime factorization and multiply: 72 = 2³ × 3² has (3 + 1)(2 + 1) = 12 factors.
What is a factor tree?
A diagram that splits a number into two factors, then splits each factor again until only primes remain at the ends of the branches.
Sources and legal basis
- Wolfram MathWorld – Prime factorization
- Wolfram MathWorld – Fundamental theorem of arithmetic
- Wolfram MathWorld – Divisor function: number and sum of divisors
As of:
Related tools
- GCF and LCM CalculatorGCF and LCM calculator for two or more numbers: greatest common factor, least common multiple, prime factorization, Euclidean algorithm and all common factors.
- Square Root CalculatorSquare root calculator with steps: square, cube and nth roots, simplified radical form (√72 = 6√2), prime factorisation and the Babylonian method.
- Fraction CalculatorAdd, subtract, multiply and divide fractions and mixed numbers with step-by-step solutions. Simplify fractions and convert decimals to fractions.
- Online CalculatorFree online calculator: type or tap and see the answer instantly – with order of operations, brackets, percent, square root, steps and history.
- Age CalculatorCalculate your exact age from your date of birth in years, months and days, in total days, weeks and months – plus the countdown to your next birthday.
- Average CalculatorAverage calculator: mean, median and mode of a list of numbers, plus geometric, harmonic and weighted average – paste from Excel, get the working instantly.