Prime Factorization Calculator

This prime factorization calculator breaks a whole number down into the primes that multiply to make it. It writes the result in exponent form and in full, draws a factor tree, shows each step of the division ladder, counts the number’s divisors, and tells you when the number you entered is already prime. It handles numbers from 2 up to one trillion.

Prime factorization calculatorLive — updates as you type
Any whole number from 2 to 1,000,000,000,000.

How to use the prime factorization calculator

  1. Type a whole number of 2 or more. The calculator opens with 360.
  2. Read the prime factorization at the top in exponent form, 360 = 2³ × 3² × 5, and underneath it written out in full, 2 × 2 × 2 × 3 × 3 × 5.
  3. Look at the factor tree, which branches 360 into smaller factors until every branch ends in a prime.
  4. Follow the division ladder, which divides by the smallest prime that fits at each step: 360 ÷ 2 = 180, and so on down to 1.
  5. Check the divisor count. 360 has 24 divisors in total.

If the number you enter has no factor other than 1 and itself, the calculator says it is prime and stops there. To see what a prime is and how to test one by hand, read what is a prime number. To list all 24 divisors of 360 rather than just count them, switch to the factor calculator.

What prime factorization is

Prime factorization means writing a number as a product of prime numbers only. Every whole number above 1 is either prime or can be built by multiplying primes, and there is only one set of primes that does it. That second fact is called the fundamental theorem of arithmetic, and it is what makes prime factorization useful: it is a fingerprint for the number.

n = p₁a × p₂b × p₃c × …
Each p is a different prime, written smallest first; each exponent says how many times it is used.

The exponent form is shorthand for the expanded form. 2³ means three 2s multiplied together, so 2³ × 3² × 5 is the same as 2 × 2 × 2 × 3 × 3 × 5, which multiplies back to 360. If exponents feel rusty, exponent rules covers how they behave.

The number 1 never appears in a prime factorization. It is not prime, and multiplying by it changes nothing, so including it would break the “only one way” rule: you could add as many 1s as you liked.

The division ladder method

The ladder is the most reliable way to factor a number by hand, and it is the method the calculator’s steps follow. Divide by the smallest prime that goes in evenly. Write the quotient below. Repeat on the quotient until you reach 1. The primes you divided by, read down the side, are the factorization.

360 ÷ 2 = 180 180 ÷ 2 = 90 90 ÷ 2 = 45 45 ÷ 3 = 15 45 is odd, so try 3 15 ÷ 3 = 5 5 ÷ 5 = 1 primes used: 2, 2, 2, 3, 3, 5 360 = 2³ × 3² × 5

Two habits keep the ladder fast. First, stay on a prime until it stops dividing before moving to the next one; that way the primes come out in order and grouped. Second, you only need to try primes up to the square root of what is left. If nothing up to that point divides the current number, the current number is itself prime and is the last rung.

Example: 1001

1001 is odd, its digits add to 2 so 3 is out, and it does not end in 0 or 5.

1001 ÷ 7 = 143 143 ÷ 11 = 13 13 is prime (√13 ≈ 3.6, and neither 2 nor 3 divides 13) 1001 = 7 × 11 × 13

The check on 13 shows the square-root rule saving work: there is no need to try 5, 7 or 11.

How to make a factor tree

A factor tree does the same job as the ladder but lets you split a number into any two factors, not just a prime and the rest. Write the number at the top. Draw two branches down to any pair of factors that multiply to it. Keep splitting every composite number. A branch stops when it reaches a prime; circle it. The circled primes are the factorization.

360 / \ 36 10 / \ / \ 6 6 (2) (5) / \ / \ (2)(3)(2)(3) circled: 2, 3, 2, 3, 2, 5 → 360 = 2³ × 3² × 5

Start the tree a different way and you get a different shape, but the same leaves:

360 / \ 8 45 / \ / \ (2) 4 9 (5) / \ / \ (2)(2)(3)(3) circled: 2, 2, 2, 3, 3, 5 → 360 = 2³ × 3² × 5

This is the fundamental theorem of arithmetic in action. However you split 360, you end at three 2s, two 3s and one 5. It is a good self-check: if two trees for the same number give different primes, one of them has a multiplication error. The calculator draws its tree as a branching diagram so you can compare it against your own.

Trees are easiest when you start with a split you can see at a glance, such as a number ending in 0 being 10 times something, or an even number being 2 times its half. Ladders are better for large numbers, because you never have to guess a good first split.

Worked examples

Example: prime factorization of 84

84 ÷ 2 = 42 42 ÷ 2 = 21 21 ÷ 3 = 7 7 is prime 84 = 2² × 3 × 7

Divisors: (2 + 1)(1 + 1)(1 + 1) = 12.

Example: prime factorization of 1024

1024 → 512 → 256 → 128 → 64 → 32 → 16 → 8 → 4 → 2 → 1 ten divisions by 2 1024 = 2¹⁰

A number with only one prime in its factorization is a prime power. 1024 has 10 + 1 = 11 divisors: 1, 2, 4, and so on up to 1024.

Example: is 97 prime?

√97 ≈ 9.85, so try the primes 2, 3, 5, 7 97 is odd; 9 + 7 = 16; it does not end in 0 or 5; 97 ÷ 7 = 13 r 6 no prime up to 9 divides 97 97 is prime

The prime factorization of a prime is the number itself. The calculator reports this instead of drawing a tree. How primes differ from composite numbers, and why 1 is neither, is covered in prime and composite numbers.

What prime factorization is used for

Counting divisors

Add 1 to each exponent and multiply. For 360 = 2³ × 3² × 5 that is 4 × 3 × 2 = 24, the divisor count the calculator shows.

Finding the GCF and LCM

Line up two factorizations. Shared primes at their lowest power multiply to the GCF; every prime at its highest power multiplies to the LCM. For 84 and 360, the GCF is 2² × 3 = 12 and the LCM is 2³ × 3² × 5 × 7 = 2,520. The GCF calculator and LCM calculator both show this table, and how to find the GCF and LCM walks through it by hand.

Simplifying fractions and square roots

Cancel shared primes from the top and bottom of a fraction: 84/360 loses 2² × 3 from each side and becomes 7/30, the same answer the simplify fractions calculator reaches through the GCF. For a square root, pair up identical primes and bring one of each pair outside: √360 = √(2² × 3² × 2 × 5) = 2 × 3 × √10 = 6√10. The square root calculator gives the same simplified radical, and a number whose exponents are all even, such as 144 = 2⁴ × 3², is one of the perfect squares.

Prime factorization of common numbers

Prime factorizations of the composite numbers that come up most in homework, up to 180, with each divisor count:

NumberExponent formExpandedDivisors
122² × 32 × 2 × 36
182 × 3²2 × 3 × 36
202² × 52 × 2 × 56
242³ × 32 × 2 × 2 × 38
282² × 72 × 2 × 76
302 × 3 × 52 × 3 × 58
322⁵2 × 2 × 2 × 2 × 26
362² × 3²2 × 2 × 3 × 39
402³ × 52 × 2 × 2 × 58
422 × 3 × 72 × 3 × 78
453² × 53 × 3 × 56
482⁴ × 32 × 2 × 2 × 2 × 310
502 × 5²2 × 5 × 56
542 × 3³2 × 3 × 3 × 38
562³ × 72 × 2 × 2 × 78
602² × 3 × 52 × 2 × 3 × 512
642⁶2 × 2 × 2 × 2 × 2 × 27
722³ × 3²2 × 2 × 2 × 3 × 312
753 × 5²3 × 5 × 56
802⁴ × 52 × 2 × 2 × 2 × 510
842² × 3 × 72 × 2 × 3 × 712
902 × 3² × 52 × 3 × 3 × 512
962⁵ × 32 × 2 × 2 × 2 × 2 × 312
982 × 7²2 × 7 × 76
1002² × 5²2 × 2 × 5 × 59
1202³ × 3 × 52 × 2 × 2 × 3 × 516
1442⁴ × 3²2 × 2 × 2 × 2 × 3 × 315
1802² × 3² × 52 × 2 × 3 × 3 × 518

Common mistakes

  • Stopping on a composite number. Ending a tree at 4, 9 or 15 leaves the job unfinished. Every final branch must be prime.
  • Treating 1 as a prime. 1 never goes in a factorization, and it is not a valid last rung of the ladder; the ladder ends when the quotient reaches 1.
  • Losing a repeated prime. 72 = 2³ × 3², not 2 × 3. Count every circled leaf.
  • Writing 9 or 15 as a “prime” because it is odd. Odd is not the same as prime: 9 = 3² and 15 = 3 × 5.
  • Testing past the square root. Not wrong, but slow. If no prime up to √n divides n, n is prime.
  • Not multiplying back. Multiplying the primes should give the original number exactly. It takes seconds and catches nearly every slip.

Frequently asked questions

What is the prime factorization of 36?

The prime factorization of 36 is 2² × 3², or 2 × 2 × 3 × 3 written out. A ladder gives 36 ÷ 2 = 18, 18 ÷ 2 = 9, 9 ÷ 3 = 3, 3 ÷ 3 = 1. Both exponents are even, which is why 36 is a perfect square, and (2 + 1)(2 + 1) = 9 tells you it has nine divisors.

What is the prime factorization of 48?

The prime factorization of 48 is 2⁴ × 3, which is 2 × 2 × 2 × 2 × 3. Halve four times, 48 → 24 → 12 → 6 → 3, and finish with 3, which is prime. Multiplying back, 16 × 3 = 48. The exponents give (4 + 1)(1 + 1) = 10 divisors.

What is the prime factorization of 100?

The prime factorization of 100 is 2² × 5², or 2 × 2 × 5 × 5. A quick factor tree splits 100 into 10 × 10, and each 10 into 2 × 5. Every power of ten factors the same way: 1,000 is 2³ × 5³, with the exponent matching the number of zeros.

What is a factor tree?

A factor tree is a diagram for finding a prime factorization. You write the number at the top, branch it into any two factors that multiply to it, and keep branching each composite number until every branch ends in a prime. The primes at the ends of the branches, multiplied together, make the original number. Different starting splits give different trees but always the same primes.

Is there only one prime factorization for each number?

Yes. Apart from the order the primes are written in, every whole number above 1 has exactly one prime factorization. This is the fundamental theorem of arithmetic. 360 is always three 2s, two 3s and one 5, whether you reach it by a ladder or by any factor tree. That uniqueness is why 1 is not counted as prime.

What is the prime factorization of a prime number?

A prime number’s factorization is just the number itself, with an exponent of 1. The prime factorization of 97 is 97. There is nothing to split, since a prime has no factors other than 1 and itself. The calculator detects this by testing every prime up to the square root and reporting that the number is prime.

How do you write prime factorization with exponents?

Group identical primes and write each group as a power, smallest prime first. 2 × 2 × 2 × 3 × 3 × 5 becomes 2³ × 3² × 5. A prime used once takes no visible exponent. When typing without superscripts, use a caret: 2^3 × 3^2 × 5. The exponents are what you need for counting divisors and for finding the GCF and LCM.

Guides that use this calculator

Longer explanations of the method behind it, with worked examples.

Put this calculator on your own site (free)

Copy this into any page. The calculator stays up to date on its own, works on mobile, and carries a small credit link back here.

Preview it
Cite this page “Prime Factorization Calculator”. Four Function Calculator, 1 October 2026.https://fourfunctioncalculator.com/prime-factorization-calculator/
Shows the workingRuns entirely in your browser — nothing you type is sent anywhere.Last reviewed 1 October 2026