Common Factor Calculator

Find all common factors of two numbers and identify the GCF. Shows individual factor lists for both numbers, with common factors highlighted in blue and the GCF prominently displayed.

Guides & Reference

How It Works

All common factors — visual displayFraction simplification, number theory, understanding divisibility.

Enter two positive integers. The calculator finds all factors of each number via trial division up to √n. Then it intersects the two factor sets to find common factors. Results display in three panels: factors of A (with common ones highlighted blue), factors of B (same), and the list of all common factors with GCF shown in bold. Example: 24 and 36 — common factors: 1,2,3,4,6,12, GCF=12.

Common factors = factors(A) ∩ factors(B)24 and 36 → common: 1,2,3,4,6,12 → GCF=12
GCF via Euclidean algorithmFast GCF for large numbers without listing all factors.

The Euclidean algorithm: GCF(a,b) = GCF(b, a mod b) until b=0. For GCF(252,105): GCF(105,42) → GCF(42,21) → GCF(21,0)=21. This runs in O(log(min(a,b))) steps — very fast even for million-digit numbers. The calculator uses this internally for efficiency.

GCF(a,b) = GCF(b, a mod b) until b=0GCF(252,105)=21 | GCF(1000,750)=250
Coprime numbers — GCF = 1Cryptography, modular arithmetic, reduced fractions.

Two numbers are coprime (relatively prime) if their GCF=1 — they share no common factor other than 1. Examples: GCF(7,11)=1, GCF(8,15)=1, GCF(17,24)=1. Coprime pairs have LCM=a×b (product). Every reduced fraction has a numerator and denominator that are coprime. RSA cryptography relies on choosing two large coprime numbers.

Coprime: GCF(a,b)=1 | LCM(a,b)=a×bGCF(8,15)=1 → coprime, LCM=120=8×15
GCF for fraction simplificationReducing fractions to lowest terms.

To simplify a/b: find GCF(a,b), divide both by it. The result is the fully reduced fraction. Example: 48/72. GCF(48,72)=24. 48÷24=2, 72÷24=3. Simplified: 2/3. The fraction 2/3 cannot be simplified further because GCF(2,3)=1. The calculator shows GCF — divide numerator and denominator by it to simplify.

Simplified a/b = (a/GCF)/(b/GCF)48/72: GCF=24 → simplified 2/3
GCF and LCM relationshipFinding LCM efficiently from GCF.

Once you know GCF(a,b), LCM(a,b) = a×b/GCF(a,b). This avoids computing LCM separately. Example: GCF(12,18)=6. LCM = 12×18/6 = 216/6 = 36. Verify: 36÷12=3 ✓, 36÷18=2 ✓. The GCF and LCM always satisfy GCF×LCM = a×b — a fundamental theorem of number theory.

LCM(a,b) = a×b / GCF(a,b)GCF(12,18)=6 → LCM=12×18/6=36

Quick Reference

Verify these in the calculator above.

GCF

GCF(12, 18)

6

GCF

GCF(48, 36)

12

Common

Common factors 12,18

1,2,3,6

Coprime

GCF(7, 11)

1 (coprime)

GCF

GCF(100, 75)

25

LCM

LCM from GCF: 12,18

36

Fraction

Simplify 48/72

2/3

Euclidean

GCF(252, 105)

21

Tips & Shortcuts

Quick-pick example pairs (12&18, 24&36, 100&75) are shown above the input fields — click any to prefill both fields instantly.

The blue highlighting on factor lists immediately shows which factors are shared without needing to compare lists manually.

GCF=1 means the numbers are coprime — no common factor larger than 1. This is the condition for a fraction to already be in lowest terms.

To find LCM from the GCF result: LCM = (number1 × number2) / GCF. This is often faster than listing multiples.

For three numbers, find GCF of the first two, then find GCF of that result with the third: GCF(a,b,c) = GCF(GCF(a,b), c).

Common Mistakes

Confusing GCF with LCM

GCF is the largest factor dividing INTO all numbers. LCM is the smallest multiple that all numbers divide INTO. GCF(12,18)=6 (6 fits into 12 and 18). LCM(12,18)=36 (12 and 18 fit into 36). They are fundamentally different despite being related.

Thinking GCF equals the product

GCF(a,b) ≤ min(a,b) — it cannot equal a×b unless one of them is 1. GCF(3,4)=1, not 12. GCF(6,6)=6, not 36. The product a×b = GCF×LCM.

Expecting GCF to exist for non-integer inputs

GCF is defined for positive integers. The calculator accepts only whole numbers. For decimal inputs, multiply to clear decimals first: GCF(1.5, 2.25) → multiply by 4 → GCF(6, 9) = 3, so original GCF = 3/4 = 0.75.

Forgetting 1 is always a common factor

Every pair of positive integers has at least 1 as a common factor. The GCF is at minimum 1 (for coprime numbers). The common factor list always includes 1.

Applying GCF to more than two numbers incorrectly

For three numbers a,b,c: GCF(a,b,c) = GCF(GCF(a,b), c). Do not average or multiply the pairwise GCFs. GCF(12,18,24): GCF(12,18)=6, GCF(6,24)=6. Answer: 6.

Frequently Asked Questions

A common factor (or common divisor) of two integers is a number that divides evenly into both. For 12 and 18: factors of 12 are 1,2,3,4,6,12 and factors of 18 are 1,2,3,6,9,18. Common factors are 1,2,3,6. The GCF (greatest common factor) is 6.

GCF is the largest number that divides evenly into all given numbers. GCF(12,18)=6. Also called HCF (Highest Common Factor) or GCD (Greatest Common Divisor). Uses: simplifying fractions (divide numerator and denominator by GCF), and solving Diophantine equations.

The calculator displays all factors of each number. Factors that appear in both lists are highlighted in blue. The GCF (largest blue factor) is displayed prominently at the top. This visual format makes it easy to see which factors are shared at a glance.

GCF(a,b) = GCF(b, a mod b) repeatedly until b=0. GCF(48,18): GCF(18,48 mod 18)=GCF(18,12), then GCF(12,6), then GCF(6,0)=6. This is faster than listing all factors for large numbers.

GCF(a,b) × LCM(a,b) = a × b. So LCM(a,b) = a×b / GCF(a,b). For 12 and 18: GCF=6, LCM=12×18/6=36. Verify: 36÷12=3 ✓, 36÷18=2 ✓.

Divide numerator and denominator by their GCF. To simplify 24/36: GCF(24,36)=12. 24÷12=2, 36÷12=3. Simplified: 2/3. This is the fully reduced fraction — no further simplification is possible because GCF(2,3)=1.

No. GCF(a,b) ≤ min(a,b). The GCF divides both numbers, so it cannot exceed either. For coprime numbers (GCF=1) like 7 and 11: no common factor larger than 1 exists — the only common factor is 1.

Related Calculators