WebyTooly

GCF and LCM calculator

Enter two positive integers to calculate their GCF and LCM.

Espacio publicitario
Greatest common factor (GCF)
6
Least common multiple (LCM)
36
Espacio publicitario

How GCF and LCM are calculated

The GCF is calculated with the Euclidean algorithm. The LCM is derived from the GCF by dividing the product of both numbers by their GCF.

LCM(a, b) = (a × b) ÷ GCF(a, b)

Worked example

GCF(12, 18) = 6 and LCM(12, 18) = 36.

Frequently asked questions

What is the GCF?
The greatest common factor (GCF) is the largest number that evenly divides two or more numbers.
What is the LCM?
The least common multiple (LCM) is the smallest number that is a multiple of two or more numbers at once.
What are GCF and LCM used for?
They're used to simplify fractions (GCF) and to add or subtract fractions with different denominators (LCM), among other applications.
Does it work with decimal numbers?
No. GCF and LCM are defined for positive whole numbers.

Related calculators