Factor Calculator
MathEnter a whole number from 1 to 1,000,000,000. The calculator lists all of its factors and factor pairs, shows the prime factorization and tells you whether the number is prime.
Step by step
36 = 2² · 3²
- Write 36 as a product of primes: 2² · 3². A prime stays as it is, and 1 has no prime factors.
- Add 1 to every exponent and multiply the results to count the factors: 9 in all.
- Combine the prime powers and sort the products: 1, 2, 3, 4, 6, 9, 12, 18, 36.
- Pair every factor up to the square root of 36 with 36 divided by it, as the table of factor pairs shows. The factors add up to 91.
Once every entry is valid, you’ll see each step of the calculation here.
Formula
- n
- the whole number you entered
- pi
- the distinct primes that divide n
- ai
- the exponent of p_i in the prime factorization of n
- ∏
- the product of the terms for all the primes
How it works
A factor of a number is a whole number that divides it evenly, with no remainder. Factors come in pairs that multiply to the number: for 36 they are 1 × 36, 2 × 18, 3 × 12, 4 × 9 and 6 × 6, so the factors are 1, 2, 3, 4, 6, 9, 12, 18 and 36. Every number above 1 has at least two factors, 1 and itself. A prime number has exactly these two, while a composite number has more. The number 1 has only one factor and counts as neither prime nor composite.
The calculator first writes the number as a product of primes. By the fundamental theorem of arithmetic this prime factorization is unique: 36 = 2² × 3². Each factor is a product of these primes with exponents from zero up to the ones in the factorization, so the number of factors is each exponent plus 1, multiplied together: (2 + 1) × (2 + 1) = 9. You only need to test divisors up to the square root of the number, because a divisor d always comes with the partner n / d. That is why the table of factor pairs ends at the square root. A perfect square such as 36 or 100 has an odd number of factors, since its root is paired with itself.
In school, finding all the factor pairs of a whole number up to 100 is a grade 4 skill in the Common Core standards. Factors also help with simplifying fractions, finding a common denominator and arranging items in equal rows. To find what two numbers share, use the GCF calculator, and to reduce a fraction use the fraction calculator. This page factors whole numbers. An algebraic expression such as x² + 5x + 6 needs a different tool, although its factor pairs of 6 (1 × 6 and 2 × 3) show that 2 and 3 add to 5, which gives (x + 2)(x + 3).
The formula
For 36 = 2² × 3², the number of factors is (2 + 1)(2 + 1) = 9, and the sum is (1 + 2 + 4)(1 + 3 + 9) = 7 × 13 = 91. The calculator lists the factors by multiplying every power of 2 (1, 2, 4) with every power of 3 (1, 3, 9) and sorting the products.
Each factor up to the square root is matched with n divided by it. For 36 the square root is 6, so the pairs are 1 × 36, 2 × 18, 3 × 12, 4 × 9 and 6 × 6. The upper limit of 1,000,000,000 keeps the lists short enough to read and the calculation instant.
Example
A teacher wants to arrange 36 desks in a rectangle. Which layouts are possible?
- The factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, 36: 9 factors in all.
- Pair them up: 1 × 36, 2 × 18, 3 × 12, 4 × 9 and 6 × 6. Each pair is one rectangle, with that many rows and columns.
- That gives 5 different rectangles, or 9 layouts if rows and columns count separately. The 6 by 6 square is possible because 36 is a perfect square.
The factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, 36. That is 9 factors, and the prime factorization is 2² · 3².
Load this example into the calculatorFrequently asked questions
What are the factors of a number?
The factors of a number are the whole numbers that divide it exactly. The factors of 12 are 1, 2, 3, 4, 6 and 12, because each of them goes into 12 with no remainder. Every factor is paired with another one: 3 × 4 = 12. Factors are also called divisors.
How do you find all the factors of a number?
Try dividing by 1, 2, 3 and so on, up to the square root of the number. Each divisor that works gives two factors, itself and the quotient. For 48, the divisors 1, 2, 3, 4 and 6 give the pairs 1 × 48, 2 × 24, 3 × 16, 4 × 12 and 6 × 8, so the factors are 1, 2, 3, 4, 6, 8, 12, 16, 24 and 48.
What are the factors of 12, 24 and 48?
The factors of 12 are 1, 2, 3, 4, 6 and 12 (6 factors). The factors of 24 are 1, 2, 3, 4, 6, 8, 12 and 24 (8 factors). The factors of 48 are 1, 2, 3, 4, 6, 8, 12, 16, 24 and 48 (10 factors). Choose a preset above, or type any other number.
What is prime factorization?
It is writing a number as a product of primes. 36 = 2 × 2 × 3 × 3, which is written 2² × 3². Every whole number above 1 has exactly one such factorization apart from the order of the primes, and the calculator shows it under the result.
How many factors does a number have?
Write the prime factorization, add 1 to each exponent and multiply the results. For 360 = 2³ × 3² × 5 the count is (3 + 1)(2 + 1)(1 + 1) = 24. A prime has 2 factors, the square of a prime has 3, and the number 1 has only 1.
Why does a perfect square have an odd number of factors?
Factors come in pairs, but the square root pairs with itself, so it is counted only once. For 36, the pairs are 1 × 36, 2 × 18, 3 × 12 and 4 × 9, plus the lone 6, which makes 9 factors. Any other number has an even count.
Is 1 a prime number?
No. A prime has exactly two different factors, 1 and itself, and 1 has only one factor. It is not composite either. Calling 1 neither prime nor composite keeps the unique prime factorization of every number above 1 true.
What are factor pairs?
A factor pair is two whole numbers whose product is the given number. The factor pairs of 20 are 1 × 20, 2 × 10 and 4 × 5. The pairs are listed with the smaller number first, and a pair such as 6 × 6 appears once.
What is the difference between factors and multiples?
Factors divide a number, so they are at most as large as the number. Multiples are what you get by multiplying the number by 1, 2, 3 and so on, so they are at least as large. 6 is a factor of 12 and 12 is a multiple of 6. A number has a limited list of factors but endless multiples.
Can this calculator factor expressions like x² + 5x + 6?
No, it factors whole numbers only. To factor a simple quadratic by hand, list the factor pairs of the constant term, here 6: 1 × 6 and 2 × 3. Pick the pair that adds to the middle number 5, which is 2 and 3, and write (x + 2)(x + 3).
- Common Core State Standards for Mathematics, Grade 4, Operations and Algebraic Thinking, 4.OA.B.4: factor pairs, prime and composite numbers (Common Core State Standards Initiative)
- NIST Digital Library of Mathematical Functions, section 27.2: unique factorization into primes and the divisor functions (National Institute of Standards and Technology)
- Elements, Book VII, Definition 11: a prime number is measured by a unit alone (Euclid, edited by D. E. Joyce, Clark University)
- Divisor function: number and sum of divisors (Wikipedia)
- Integer factorization (Wikipedia)