Prime Factorization Calculator

Prime factorisation with factor tree and division method; prime check and divisors

Any whole number from 2 to 10¹⁵ (1,000 lakh crore). Commas and spaces are fine.
Try an example
Prime factorisation
360 = 2³ × 3² × 5
= 2 × 2 × 2 × 3 × 3 × 5
Type
Composite
Number of divisors
24
Sum of divisors
1,170
Distinct prime factors
3
Division method

Divide by the smallest prime that goes exactly, and repeat with the quotient until you reach 1.

2
360
2
180
2
90
3
45
3
15
5
5
1

So 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5

Factor tree

Split the number into a prime × another factor; keep splitting until every branch ends in a prime (green).

360218029024531535
All 24 divisors (factors)

Number of divisors = (3 + 1) × (2 + 1) × (1 + 1) = 24. Prime divisors are in green.

1234568910121518202430364045607290120180360
Factor pairs
1 × 3602 × 1803 × 1204 × 905 × 726 × 608 × 459 × 4010 × 3612 × 3015 × 2418 × 20
Square and cube roots (Class 8 method)
  • 360 = 2³ × 3² × 5 is not a perfect square (some prime has an odd power). Multiply by 10 to get the perfect square 3,600, or divide by 10 to get 36.
  • Not a perfect cube. Smallest number to multiply by for a perfect cube: 75; smallest number to divide by: 45 (gives 8).

Runs entirely in your browser. Nothing you type or upload is sent to us or stored.

Results are for general guidance. Please check anything important before relying on it. Terms of use

How to Use

  1. Type a whole number, for example 360 (commas and spaces are fine), or tap an example.
  2. The prime factorisation appears at once in power form (360 = 2³ × 3² × 5), or the tool tells you the number is prime. Use copy result or copy divisors to paste it into your notes.
  3. Scroll down for the division method (ladder) and the factor tree, drawn the way you would in your notebook.
  4. Below that are all the divisors, the factor pairs, and whether the number is a perfect square or cube, with its square root by prime factorisation.

Prime factorisation with the division method and a factor tree

Prime factorisation means writing a number as a product of prime numbers, such as 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. This prime factorization calculator does it for any whole number up to 1015. It shows the working by both methods taught in school (the division ladder and the factor tree), tells you whether a number is prime, and lists every divisor.

Prime, composite, and the number 1

  • A prime number has exactly two divisors, 1 and itself: 2, 3, 5, 7, 11, 13 …. 2 is the only even prime.
  • A composite number has more than two divisors: 4, 6, 8, 9, 10 ….
  • 1 is neither prime nor composite, because it has only one divisor.

The Fundamental Theorem of Arithmetic says every composite number can be written as a product of primes in exactly one way, apart from the order of the factors. That's why the factor tree always ends with the same primes, however you split the number.

Method 1: Division (ladder) method

Divide by the smallest prime that divides the number exactly, write the quotient below, and repeat until you reach 1. The primes down the left side are the prime factors.

2 | 360
2 | 180
2 | 90
3 | 45
3 | 15
5 | 5
  | 1 → 360 = 2³ × 3² × 5

Method 2: Factor tree

Split the number into two factors, then keep splitting every branch that is not prime. The tool splits off the smallest prime each time (360 → 2 × 180 → 2 × 90 → …), which gives a tidy tree for any size of number. If you split 360 as 36 × 10 in your notebook instead, you still end with the same primes: 2, 2, 2, 3, 3, 5.

Number and sum of divisors

If n = pa × qb × rc …, then
number of divisors = (a + 1)(b + 1)(c + 1) …

For 360 = 2³ × 3² × 5¹, the number of divisors is (3 + 1)(2 + 1)(1 + 1) = 24, and they add up to 1,170. A number whose divisors other than itself add up to the number is a perfect number: 6, 28, 496 and 8,128.

Square roots and cube roots by prime factorisation

A number is a perfect square when every prime appears an even number of times. Pair the primes and take one from each pair: 7744 = 2⁶ × 11², so √7744 = 2³ × 11 = 88. If a prime is left without a partner, the number is not a perfect square, and multiplying (or dividing) by the unpaired primes makes it one: 2352 = 2⁴ × 3 × 7², so 2352 × 3 = 7056 = 84². For cubes, the primes are grouped in threes instead.

How the prime check works

If n is composite, it has a factor no bigger than √n. So to prove that n is prime, you only need to divide by every prime up to √n. For 97, √97 ≈ 9.8, and none of 2, 3, 5 or 7 divides 97, so 97 is prime. The tool uses the same idea, which is why even a 15-digit number such as 999,999,999,999,989 (the largest prime below 1015) is checked in a moment.

RangePrimes
1–502, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47
51–10053, 59, 61, 67, 71, 73, 79, 83, 89, 97

Frequently Asked Questions

360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. By the division method: 360 ÷ 2 = 180, ÷ 2 = 90, ÷ 2 = 45, ÷ 3 = 15, ÷ 3 = 5, ÷ 5 = 1.

No. A prime has exactly two divisors (1 and itself), but 1 has only one divisor. So 1 is neither prime nor composite, and it has no prime factorisation.

Divide it by every prime up to its square root. If none divides it exactly, it's prime. For 97, √97 is about 9.8, and 2, 3, 5 and 7 all leave remainders, so 97 is prime. This tool does the same check for numbers up to 10^15.

Add 1 to each power in its prime factorisation and multiply. Write the number as p^a × q^b × r^c … and work out (a + 1)(b + 1)(c + 1) …. For 360 = 2³ × 3² × 5 that's 4 × 3 × 2 = 24 divisors. The tool lists all of them.

Factorise the number, pair equal primes, and take one prime from each pair. 7744 = (2 × 2) × (2 × 2) × (2 × 2) × (11 × 11), so √7744 = 2 × 2 × 2 × 11 = 88. If a prime is left without a pair, the number isn't a perfect square.

Only the layout; both give the same primes. The division method divides by one prime at a time down a ladder. A factor tree splits the number into two factors and keeps splitting until each branch ends in a prime. The tool shows both.