Factor Calculator CalculatorScale.com
Number Theory & STEMFactor Tree Visualizer

Factor Calculator

Please provide an integer to calculate its factors, factor pairs, prime factorization, and interactive factor tree.

Quick Presets:

What is a Factor in Mathematics?

In number theory, a factor (or divisor) of an integer n is an integer d that divides n completely without leaving a remainder.

n ÷ d = q (with remainder = 0) ⇔ d × q = n

For example, 12 can be factored as 1 × 12, 2 × 6, and 3 × 4. Therefore, the positive factors of 12 are 1, 2, 3, 4, 6, and 12.

Prime Numbers vs. Composite Numbers

Prime Numbers

A prime number is an integer greater than 1 that has exactly two distinct positive divisors: 1 and the number itself.

Examples: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 97...

Composite Numbers

A composite number is an integer greater than 1 that has more than two positive divisors. It can be factored into smaller positive integers.

Examples: 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 120...

How to Build a Factor Tree

A factor tree is a visual branching diagram used to break down any composite integer into its terminal prime factors:

  1. Write down the starting composite number at the top.
  2. Find any two factors whose product equals the number (e.g. for 120, choose 2 and 60).
  3. Draw two branches down to these factors.
  4. If a factor is prime, circle it (it is a terminal leaf).
  5. If a factor is composite, continue branching it until only prime numbers remain at the bottom.

Divisor Formulas & Classification

Total Divisor Count Formula d(n)
d(n) = (e₁ + 1)(e₂ + 1)...(eₖ + 1)

Derived from the exponents of its prime factor decomposition p₁^(e₁) × p₂^(e₂)...

Sum of Divisors Formula σ(n)
σ(n) = ∏ [(pᵢ^(eᵢ+1) - 1) / (pᵢ - 1)]

Computes the exact arithmetic sum of all positive integer divisors.

Frequently Asked Questions

Is 1 considered a prime number or composite number?

Neither. In modern mathematics, 1 is defined as a unit (the multiplicative identity). Prime numbers must have exactly two distinct positive divisors, whereas 1 only has one (itself).

Why do perfect squares have an odd number of factors?

Factors of non-square numbers always appear in distinct pairs (a × b = n with a ≠ b). For a perfect square, one of the pairs consists of the square root multiplied by itself (k × k = n), resulting in an odd total count of divisors.

What is a perfect number?

A perfect number is a positive integer equal to the sum of its proper divisors (its aliquot sum). For example, 6 has proper divisors 1, 2, and 3, and 1 + 2 + 3 = 6.