Skip to content
Prime Checker
Menu

Prime Factorization of 126

Updated · exact integer math

126 = 2 × 3² × 7

2 × 3 × 3 × 7

The prime factorization of 126 is 2 × 3² × 7: the only way to write 126 as a product of prime numbers. Its prime factors are 2, 3 and 7.

How to find the prime factorization of 126

Divide by the smallest prime that goes in evenly, and repeat with the result until you reach 1:

StepDivisionWhy this prime
1126 ÷ 2 = 63126 is even
263 ÷ 3 = 2163's digits add to a multiple of 3
321 ÷ 3 = 721's digits add to a multiple of 3
47 ÷ 7 = 17 is prime, so it divides only by itself

The primes you divided by, 2 × 3 × 3 × 7, multiply back to 126. Grouping repeats with exponents gives 2 × 3² × 7.

Factor tree for 126

A factor tree splits the number into two factors, then keeps splitting any factor that isn't prime:

The branch ends at 3 and 7, both prime. Every leaf of the tree is a prime factor.

All factors of 126

126 has 12 factors: 1, 2, 3, 6, 7, 9, 14, 18, 21, 42, 63, 126. As factor pairs:

1 × 126 = 126
2 × 63 = 126
3 × 42 = 126
6 × 21 = 126
7 × 18 = 126
9 × 14 = 126

You can count them from the exponents: add 1 to each exponent in 2 × 3² × 7 and multiply, (1 + 1) × (2 + 1) × (1 + 1) = 12. The factors add up to 312.

Prime factorization of nearby numbers

NumberPrime factorization
1162² × 29
1173² × 13
1182 × 59
1197 × 17
1202³ × 3 × 5
12111²
1222 × 61
1233 × 41
1242² × 31
1255³

For any other number, the prime number checker shows the full factorization of numbers up to 24 digits, and the divisibility rules make the first steps quick by hand.

Questions people ask

What is the prime factorization of 126?

126 = 2 × 3² × 7, or 2 × 3 × 3 × 7.

What are the prime factors of 126?

2, 3 and 7.

How many factors does 126 have?

12: 1, 2, 3, 6, 7, 9, 14, 18, 21, 42, 63, 126.

Sources

More prime number tools