Math Tool
Common Factor Calculator
Find all common factors, the greatest common factor (GCF), and least common multiple (LCM) of two or more integers.
Greatest Common Factor (GCF)
12
Math Tool
Find all common factors, the greatest common factor (GCF), and least common multiple (LCM) of two or more integers.
Greatest Common Factor (GCF)
12
A common factor is a whole number that divides evenly into two or more integers. The greatest common factor (GCF) is the largest such number. The least common multiple (LCM) is the smallest positive integer divisible by all input numbers. Together, GCF and LCM reveal the hidden structure of how numbers relate.
Enter two or more integers separated by commas. The calculator uses the Euclidean algorithm to find the GCF by repeatedly replacing the larger number with the remainder of division until reaching zero. It then lists all common factors by finding divisors of the GCF, and computes the LCM using the formula lcm(a, b) = (a × b) / gcd(a, b), extended to multiple numbers.
GCF = gcd(n₁, n₂, ..., nₖ) using Euclidean algorithm; LCM = (n₁ × n₂) / gcd(n₁, n₂) extended recursivelyThe Euclidean algorithm works by dividing the larger number by the smaller and repeating with the divisor and remainder until the remainder is zero; the last non-zero remainder is the GCF. The LCM formula exploits the relationship that the product of two numbers equals their GCF times their LCM.
| Input | Result | Notes |
|---|---|---|
| 12, 18 | GCF = 6; LCM = 36 | 12 = 2² × 3 and 18 = 2 × 3², so their GCF is 2 × 3 = 6 and LCM is 2² × 3² = 36. |
| 24, 36, 60 | GCF = 12; LCM = 360 | All three share factors 1, 2, 3, 4, 6, 12; their LCM is 360 = 2³ × 3² × 5. |
| 100, 150, 200 | GCF = 50; LCM = 600 | Common factors are 1, 2, 5, 10, 25, 50; LCM is 2³ × 3 × 5² = 600. |
GCF (greatest common factor) is the largest number that divides all inputs. LCM (least common multiple) is the smallest number divisible by all inputs. If GCF = 12 and LCM = 360, then 12 divides all numbers and all numbers divide 360.
7 and 11 are both prime numbers. Two different primes share only 1 as a common factor, so they are coprime. Their LCM is 7 × 11 = 77.
The calculator works with the absolute values of integers, so −24 and 24 are treated identically. GCF and LCM are always positive.
Find the GCF of the numerator and denominator, then divide both by that GCF. For example, 24/36 has GCF = 12, so it simplifies to 2/3.
The GCF includes each prime factor raised to the minimum power across all numbers; the LCM includes each prime raised to the maximum power. This explains why GCF × LCM = n₁ × n₂.
Compute the LCM of the denominators. For example, to add 1/12 + 1/18, find LCM(12, 18) = 36, then rewrite as 3/36 + 2/36 = 5/36.