Free tool

Factor calculator, factors and prime factors.

Type a whole number to see all of its factors, its factor pairs and its prime factorisation with exponents. The page tells you whether the number is prime or composite, how many factors it has and what they add up to, whether it is perfect, abundant or deficient, and whether it is a square or a cube. A factor tree is drawn for you, and the steps are written out. It handles very large numbers and says clearly when one is too hard to finish.

Try

Whole numbers up to 40 digits. Numbers over about 12 digits are split with Pollard's rho within a short time limit, so a number made of two huge primes may not finish.

Worked out in your browser. Nothing is sent anywhere.

The maths

Split a number into primes.

01 / Factors

Numbers that divide it

A factor divides the number exactly, with nothing left over. Factors come in pairs that multiply to the number.

02 / Primes

The building blocks

Every number above 1 is a product of primes in exactly one way. That is its prime factorisation.

03 / Counting

From the exponents

The number of factors and their sum come straight from the exponents in the prime factorisation.

Guide

How to find the factors of a number, with worked examples.

A factor calculator lists every whole number that divides a given number exactly. The factors of 12 are 1, 2, 3, 4, 6 and 12. This page also splits the number into primes, which is its prime factorisation, pairs the factors up, counts them, adds them, and draws a factor tree. Everything is exact, so it works for numbers far bigger than a pocket calculator can hold.

How to use the factor calculator

  1. Type a whole number in Number. The answer appears as you type.
  2. Read the big card for the prime factorisation, or the message that the number is prime. The smaller cards give the number of factors, their sum, the type and whether it is a square or a cube.
  3. Open Factor pairs and All factors for the lists, and Steps and Factor tree for the working.
  4. Use − 1 and + 1 to step to the next number, Random for a number to try, and Include negative factors if your course counts them.
  5. Use Copy result to copy the answer, or Copy link to share the number.

A worked example: 360

Divide by the smallest prime that fits, again and again. 360 ÷ 2 = 180, 180 ÷ 2 = 90, 90 ÷ 2 = 45, then 45 ÷ 3 = 15, 15 ÷ 3 = 5, and 5 is prime. So 360 = 2³ × 3² × 5. To count the factors, add 1 to each exponent and multiply: (3 + 1) × (2 + 1) × (1 + 1) = 24. To add them, multiply the sums for each prime: (1 + 2 + 4 + 8) × (1 + 3 + 9) × (1 + 5) = 15 × 13 × 6 = 1170.

The 24 factors make 12 factor pairs: 1 × 360, 2 × 180, 3 × 120, 4 × 90, 5 × 72, 6 × 60, 8 × 45, 9 × 40, 10 × 36, 12 × 30, 15 × 24 and 18 × 20. The pairs stop at the square root, since after that the same pairs repeat in reverse. The square root of 360 is a little under 19, and the last pair is 18 × 20.

Prime or composite

A prime has exactly two factors, 1 and itself, as 97 does. A composite number has more, as 360 does. The number 1 is neither: it has only one factor. A quick check by hand is to try the primes up to the square root. For 97 that means 2, 3, 5 and 7, and none of them divide it, so it is prime.

Perfect, abundant and deficient numbers

Add up the proper factors, which are all the factors except the number itself, and compare the total with the number. If they are equal, the number is perfect. If the total is bigger, it is abundant. If smaller, it is deficient.

NumberProper factorsSumType
61, 2, 36Perfect
121, 2, 3, 4, 616Abundant
81, 2, 47Deficient
281, 2, 4, 7, 1428Perfect

Every prime is deficient, because its only proper factor is 1. The card named Type shows the answer for your number.

Squares and cubes

A number is a square when every exponent in its prime factorisation is even, and a cube when every exponent is a multiple of 3. For example 36 = 2² × 3² is a square, 6 × 6, and 27 = 3³ is a cube. Squares are also the numbers with an odd count of factors, because one pair is made of the same number twice.

Big numbers and the time limit

Numbers up to about a trillion are split by trial division with a wheel that skips multiples of 2, 3 and 5. Bigger ones use a primality test and Pollard's rho method. Both run inside your browser for a couple of seconds at most. The number 600851475143 splits at once into 71 × 839 × 1471 × 6857. A number made of two very large primes, of about 12 digits each or more, can take longer than the limit. In that case the page shows the factors it found, marks what is left as composite, and says it did not finish. It never guesses.

Common problems

  • Decimals such as 2.5 have no factors in this sense. Use whole numbers.
  • 0 is not listed, because every number divides it.
  • A minus sign is ignored for the main answer. Tick Include negative factors to list the negative ones too.

To find the greatest common factor or least common multiple of several numbers, use the GCF and LCM calculator. For the remainder after a division, try the remainder calculator, and to simplify a fraction, the fraction calculator.

Questions

Good to know.

How do you find the factors of a number?

Try dividing it by 1, 2, 3 and so on up to its square root. Each number that divides it exactly is a factor, and so is the result of that division. The calculator does this for you.

What are the factors of 12?

1, 2, 3, 4, 6 and 12. They make three pairs: 1 × 12, 2 × 6 and 3 × 4.

What is prime factorisation?

Writing a number as a product of primes. 12 = 2² × 3. Every number above 1 has exactly one such form, apart from the order.

Is 1 a prime number?

No. A prime has exactly two factors, and 1 has only one. It is neither prime nor composite.

How many factors does a number have?

Add 1 to each exponent in its prime factorisation and multiply. 360 = 2³ × 3² × 5 has 4 × 3 × 2 = 24 factors.

What is a factor tree?

A diagram that splits a number into two factors, then splits each of those, until only primes are left. The primes at the bottom are the prime factors.

What is the difference between a factor and a multiple?

A factor divides the number. A multiple is what you get by multiplying the number. 3 is a factor of 12, and 12 is a multiple of 3.

Why did it say it could not finish?

Some huge numbers made of two large primes take longer than the time limit. The page shows the primes it did find and does not guess the rest.

Is anything sent anywhere?

No. Everything is worked out in your browser.