Math Calculators

GCF & LCM calculator.

Find the Greatest Common Factor (GCF) and Least Common Multiple (LCM) of any set of positive integers. Updates instantly as you type.

Inputs

Enter two or more positive integers separated by commas or spaces.

Result

Enter numbers above to see the GCF and LCM.

Understanding GCF and LCM

The Greatest Common Factor (GCF), also called the Greatest Common Divisor (GCD), is the largest positive integer that divides each of the input numbers without a remainder. The Least Common Multiple (LCM) is the smallest positive integer that every input number divides into evenly. For any two numbers a and b, GCF(a,b) × LCM(a,b) = a × b.

Practical applications

GCF is essential when simplifying fractions to their lowest terms. Divide both the numerator and denominator by their GCF. LCM is crucial for adding or subtracting fractions with different denominators — the LCM of the denominators becomes the common denominator.

How this calculator works

For each pair of numbers we use the Euclidean algorithm to find the GCF, then chain pairwise to handle more than two values. The LCM uses the identity LCM(a,b) = |a × b| / GCF(a,b). Prime factorisations are derived by trial division and shown for each input.