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: · Editorial policy
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 CalculatorFraction calculator with steps: add, subtract, multiply and divide fractions and mixed numbers or type a whole expression. Simplify, compare, convert to %.
- Online CalculatorCalculator online, free and instant: type or tap and see the answer as you go – order of operations, brackets, percent, square root, steps and a history list.
- Interactive Periodic Table of the ElementsPeriodic table with all 118 elements: atomic mass, electron configuration, melting and boiling point. Search, temperature slider, colour modes, print to PDF.
- Happy Number CheckerHappy number checker: see every step of the digit-square sum until it reaches 1 or the 4 → 16 → … → 4 loop, spot happy primes and list all happy numbers.
- Digit Sum CalculatorDigit sum calculator with steps: add the digits, see the digital root and the alternating digit sum, and check divisibility by 2 to 11 for any whole number.
- Least Common Denominator CalculatorLeast common denominator calculator for two or more fractions: the LCM of the denominators, converted fractions and their sum with every step shown.
- Degrees of Freedom CalculatorDegrees of freedom calculator for t-tests (one and two samples, Welch), the chi-square test and ANOVA, with formulas, steps and worked examples.