Prime Factorization of 12

12 = 22 × 3

Properties of 12

Prime factors 2, 3
Distinct prime factors 2
Total number of divisors 6
Sum of divisors 28
Perfect square No
Prime number No
Factorization tree
  • 12
    • 2
    • 6
      • 2
      • 3

Factorize another number

Try: 12 · 360 · 1001 · 720720 · 999999937

Limit: 2 to 10¹² (1,000,000,000,000).

Enter any positive integer up to 1 trillion (10¹²) to find its unique prime factorization. You will see the canonical form (e.g. 360 = 2³ × 3² × 5), the divisor count, divisor sum, and an interactive factorization tree.


About prime factorization

What is prime factorization?

The prime factorization of an integer n ≥ 2 is the unique way to write n as a product of prime numbers. By the Fundamental Theorem of Arithmetic, every integer ≥ 2 has exactly one such representation (up to the order of factors). For example, 12 = 22 × 3.

How are the divisor count and sum computed?

If n = p₁e₁ × … × pkek, the number of divisors is τ(n) = (e₁+1)…(ek+1) and the sum of divisors is σ(n) = ∏ (1 + p + p² + … + pe) for each prime power. For 12 = 22 × 3:

τ(12) = 3 × 2 = 6 (1, 2, 3, 4, 6, 12)

σ(12)
= (1 + 2 + 2²)
× (1 + 3)

= 7 × 4

= 28

Frequently asked questions

A prime factor of n is a prime number that divides n exactly (with zero remainder). Every composite number has at least one prime factor less than or equal to its square root.
The tool uses trial division: it tests divisibility by 2, 3, then by all numbers of the form 6k − 1 and 6k + 1 up to √n. Each time a divisor d is found, it divides n by d as many times as possible, recording the prime and its exponent.
A factorization tree shows how a number is repeatedly split into smaller factors until all leaves are prime. Each composite node is split into its smallest prime factor and the remaining quotient. Prime leaves are highlighted in green.
A positive integer n is a perfect square if and only if every prime in its factorization appears with an even exponent. For example, 36 = 2² × 3² is a perfect square; 18 = 2 × 3² is not.
Every divisor of n corresponds to choosing an exponent between 0 and ei for each prime pi. The number of such choices is (e₁+1)…(ek+1). For 12 = 22 × 3: 3 × 2 = 6 divisors.


Send your feedback