Factor Calculator

Find all factors of any number, check prime status, and see the full prime factorization. Shows factor count, factor sum, and nearby primes.

Guides & Reference

How It Works

Trial DivisionFinding all factor pairs

Test every integer from 1 to √n. If i divides n evenly, record both i and n/i as factors. Stop at √n — any factor above √n pairs with one below √n.

For each i from 1 to √n: if n%i==0 → factors: i and n/in=36: √36=6 → check 1,2,3,4,5,6 → factors: 1,2,3,4,6,9,12,18,36
Prime FactorizationBuilding block of number theory

Every integer > 1 is either prime or can be written uniquely as a product of primes. Divide by 2 until odd, then by 3, 5, 7... up to √n.

n = p1^a1 × p2^a2 × ... (Unique)360 = 2³ × 3² × 5
Factor Count FormulaNumber of factors without listing

If n = p1^a1 × p2^a2 × p3^a3, then factor count = (a1+1)(a2+1)(a3+1). Example: 12 = 2²×3 → (2+1)(1+1) = 6 factors.

Count = (a1+1)(a2+1)(a3+1)12 = 2²×3¹ → (2+1)(1+1) = 6 factors
Prime vs CompositeClassifying numbers

A prime has exactly 2 factors. A composite has 3 or more. 1 is neither prime nor composite — it has exactly 1 factor. 2 is the only even prime.

Prime → 2 factors; Composite → 3+ factors7 is prime (factors: 1,7); 8 is composite (factors: 1,2,4,8)
Factor Sum & Perfect NumbersSum of all factors

The sum of all factors of n (including n itself) is called the sigma function σ(n). If σ(n) = 2n, the number is perfect. 6: 1+2+3+6 = 12 = 2×6.

σ(n) = sum of all factors6 is perfect: 1+2+3+6=12=2×6
Practical ApplicationUsing factors in problems

Factors help split things into equal groups. 24 students can be arranged in groups of 1,2,3,4,6,8,12,24. The factor count tells you how many arrangements are possible.

Equal groups = factor of total24 students: 8 groups of 3, or 4 groups of 6, or 3 groups of 8

Quick Reference

Common examples — verify instantly above.

Factors

Factors of 12

1,2,3,4,6,12

Factors

Factors of 48

10 factors

Prime

Factors of 97

Prime — 1,97 only

Prime

Factors of 2

Prime — 1,2 only

Count

Factor count of 36

9 factors

Count

Factor count of 100

9 factors

Sum

Factor sum of 6

12 (perfect)

Composite

Factors of 360

24 factors

Tips & Shortcuts

You only need to test up to √n to find all factor pairs. For 100, test up to 10 — every factor above 10 pairs with one below 10.

The number of factors is odd only for perfect squares. 36 has 9 factors (odd) because 6×6 pairs with itself.

A prime has exactly 2 factors (1 and itself). A number with exactly 3 factors is always a square of a prime: 4, 9, 25, 49...

To check if n is divisible by 3: add its digits. If the sum is divisible by 3, so is n. Example: 312 → 3+1+2=6 → divisible by 3.

To count factors without listing them: write prime factorization, add 1 to each exponent, multiply results. 12=2²×3¹ → (2+1)(1+1)=6.

Consecutive integers always share no common factors (GCF=1). This is useful in many number theory proofs.

Common Mistakes

Only listing factors up to n/2 instead of n

n itself is always a factor. Factors come in pairs (i, n/i). The largest factor is n.

Thinking 1 is a prime number

1 is not prime — it has only 1 factor. Primes must have exactly 2 factors: 1 and themselves.

Stopping factor search at √n and missing n

You stop testing at √n, but do not forget: n/i factors also exist. Always check if n is a factor (it always is).

Confusing prime factors with all factors

Prime factors are the building blocks (2,3,5...). All factors include composites too. Factors of 12: all of 1,2,3,4,6,12. Prime factors: 2 and 3 only.

Thinking even numbers cannot be prime

The only even prime is 2. After 2, all other primes are odd, but even ≠ composite in the case of 2.

Incorrect factor count for perfect squares

Perfect squares have an odd number of factors because one factor pairs with itself. 36 = 6×6 has 9 factors, not 8.

Frequently Asked Questions

A factor of n is any integer that divides n evenly with remainder 0. Example: factors of 12 are 1, 2, 3, 4, 6, 12 because each divides 12 exactly.

Test every integer from 1 to √n. If i divides n evenly, both i and n/i are factors. Only need to check up to √n to find all factor pairs.

Factors divide into n (3 is a factor of 12). Multiples are products of n (12, 24, 36 are multiples of 12). Factors are smaller than or equal to n; multiples are larger.

A perfect number equals the sum of its proper factors (all factors except itself). 6 = 1+2+3 and 28 = 1+2+4+7+14 are the first two perfect numbers.

Exactly 2: 1 and itself. That is the definition of a prime number.

Trial division up to √n. For 1000, only check primes up to 31. If no prime up to √n divides n, then n is prime.

For any two integers a and b: GCF(a,b) × LCM(a,b) = a × b. Example: GCF(12,18) = 6 and LCM(12,18) = 36. Check: 6 × 36 = 216 = 12 × 18 ✓. This means knowing GCF lets you find LCM instantly: LCM = (a×b)/GCF. Factors are the building blocks — GCF takes the smallest power of each shared prime, LCM takes the largest power of each prime in either number.

Related Calculators