GCF & LCM Calculator

Find the greatest common factor and least common multiple of two or more numbers. Shows prime factorization and all common factors.

Separate with commas or spaces. Works with 2 or more numbers.
GCF (Greatest Common Factor)
12
LCM (Least Common Multiple)
72
Prime Factorizations
All Common Factors
Relationship Check
Disclaimer: This tool is provided for general educational and entertainment purposes only. Results are estimates and should not be relied upon for any critical decision. Neither MayoCalc nor Cook Media Systems assumes any liability for consequences arising from the use of this tool. By using this site, you agree to our Terms of Service and Disclaimer.

What Are GCF and LCM?

The Greatest Common Factor (GCF), also called Greatest Common Divisor (GCD), is the largest number that divides two or more numbers without a remainder. The Least Common Multiple (LCM) is the smallest number that is a multiple of two or more numbers. GCF is used for simplifying fractions. LCM is used for adding fractions with different denominators and for scheduling problems.

GCF: Largest number that divides both a and b evenly
LCM = (a x b) / GCF(a, b)

How to Use This Calculator

Enter two or more numbers. The calculator shows the GCF and LCM, the prime factorization of each number, and step-by-step work using the Euclidean algorithm (for GCF) and the relationship between GCF and LCM. You can enter more than two numbers for multi-number GCF and LCM calculations.

Practical Applications

Simplifying fractions: To simplify 12/18, find the GCF of 12 and 18 (which is 6), then divide both by 6 to get 2/3. The Fraction Calculator simplifies automatically. Adding fractions: To add 1/4 + 1/6, find the LCM of 4 and 6 (which is 12), convert both fractions to 12ths, and add: 3/12 + 2/12 = 5/12. Scheduling: If event A repeats every 12 days and event B every 18 days, they coincide every LCM(12,18) = 36 days.

GCF/LCM FAQ

What is the Euclidean algorithm?
An efficient method for finding GCF: divide the larger number by the smaller, then divide the smaller number by the remainder, and repeat until the remainder is 0. The last non-zero remainder is the GCF. For example, GCF(48, 18): 48 / 18 = 2 remainder 12. 18 / 12 = 1 remainder 6. 12 / 6 = 2 remainder 0. GCF = 6.

GCF and LCM in Practice

The greatest common factor and least common multiple have practical applications beyond classroom math. GCF is used to simplify fractions (divide both parts by the GCF), scale recipes proportionally, and divide items into equal groups. LCM solves scheduling problems: if one event repeats every 12 days and another every 8 days, they will coincide every LCM(12,8) = 24 days. In music, LCM determines when rhythmic patterns realign (polyrhythms). In manufacturing, LCM calculates when machine maintenance cycles will overlap. The relationship GCF(a,b) x LCM(a,b) = a x b provides a useful shortcut. The Euclidean algorithm for finding GCF has been in use for over 2,300 years and remains one of the most efficient algorithms in mathematics.