- Enter 2 or more positive integers separated by commas or spaces. Example: 12, 18, 24. Negative numbers and decimals are not supported since GCF/LCM apply to whole numbers.
- Read the GCF. The Greatest Common Factor is the largest number that divides all your inputs evenly. GCF(12, 18, 24) = 6. It simplifies fractions and factors algebraic expressions.
- Read the LCM. The Least Common Multiple is the smallest number that is divisible by all your inputs. LCM(4, 6) = 12. It gives the common denominator for adding fractions.
- Check prime factorizations. The calculator shows how each number breaks down into prime factors, which is the underlying method used for both calculations.
GCF and LCM Calculator
Find the Greatest Common Factor (GCF) and Least Common Multiple (LCM) of two or more numbers.
Enter 2 or more positive integers
Prime Factorizations
12= 2^2 x 3
18= 2 x 3^2
24= 2^3 x 3
GCF (GCD)
6
Greatest Common Factor
LCM
72
Least Common Multiple
LCM(12, 18, 24) = 72
How to Use the GCF and LCM Calculator
GCF and LCM Methods
Euclidean algorithm for GCF: GCF(48, 18): 48 = 2 × 18 + 12 18 = 1 × 12 + 6 12 = 2 × 6 + 0 → GCF = 6 LCM from GCF: LCM(a, b) = (a × b) / GCF(a, b) LCM(12, 18) = (12 × 18) / 6 = 216/6 = 36 Prime factorization method: 12 = 2² × 3 18 = 2 × 3² GCF = 2¹ × 3¹ = 6 (lowest powers) LCM = 2² × 3² = 36 (highest powers)
Key identity: GCF(a, b) × LCM(a, b) = a × b. This lets you find LCM quickly once you know GCF: LCM = (a × b) / GCF.
Frequently Asked Questions
The Greatest Common Factor (GCF), also called Greatest Common Divisor (GCD) or Highest Common Factor (HCF), is the largest number that divides two or more integers without a remainder. GCF(24, 36) = 12 because 12 divides both. Main uses: simplifying fractions (12/18 → divide both by GCF 6 → 2/3), factoring polynomials in algebra, and reducing ratios to simplest form. In carpentry, GCF tells you the largest equal-sized tiles that will fit a room without cutting.
The Least Common Multiple is the smallest positive integer divisible by all given numbers. LCM(4, 6) = 12 because 12 is the smallest number in both the multiples of 4 (4, 8, 12...) and multiples of 6 (6, 12...). Main uses: adding and subtracting fractions with different denominators (1/4 + 1/6 needs denominator LCM = 12), scheduling repeating events (a bus every 4 minutes and a train every 6 minutes both arrive together at 12 minutes), and music (aligning different rhythmic patterns).
For any two positive 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 identity gives a shortcut: once you have the GCF, LCM = (a × b) / GCF. Note: this identity does NOT extend to three or more numbers directly.
The Euclidean algorithm finds GCF efficiently by repeated division. GCF(252, 105): divide 252 by 105 to get remainder 42. Then divide 105 by 42 to get remainder 21. Then divide 42 by 21 to get remainder 0. When the remainder is 0, the last divisor is the GCF: 21. This works for very large numbers and is one of the oldest known algorithms (described by Euclid around 300 BC).
Yes. GCF (Greatest Common Factor), GCD (Greatest Common Divisor), and HCF (Highest Common Factor) all mean exactly the same thing. Different textbooks and countries use different terms. The US commonly uses GCF in elementary school and GCD in higher mathematics and computer science. The Euclidean algorithm computes the GCD/GCF efficiently and is used in many programming languages: Python has math.gcd(), Java has BigInteger.gcd(), etc.