Two integers
For 18 and 24, the GCF is 6 and the LCM is |18 × 24| / 6 = 72.
Values stay on your device
Compare factors and multiples
Find the greatest common factor and least common multiple for a list of integers, then see how each result is built.
Calculated in your browser
Formula and steps included
No account. No signup.
Formula
GCF(a, b) = greatest positive integer dividing both; LCM(a, b) = |a × b| / GCF(a, b) for nonzero integers
The greatest common factor is the largest positive integer that divides every value without a remainder. It is useful for reducing fractions and dividing quantities into equal groups.
The least common multiple is the smallest positive multiple shared by every nonzero value. For more than two integers, compute the GCF or LCM one pair at a time.
Work with absolute values for factors and multiples; a negative sign does not change the positive GCF or LCM.
List common factors, compare prime factorizations, or repeatedly use the Euclidean algorithm.
For two nonzero integers, divide the absolute product by their GCF.
Combine the first two values, then combine that result with each remaining value in turn.
Worked examples
For 18 and 24, the GCF is 6 and the LCM is |18 × 24| / 6 = 72.
For 8, 12, and 20, the GCF is 4 and the LCM is 120.
Common questions
Use GCF to split quantities into the largest equal groups or simplify a fraction. Use LCM to find the first shared cycle, common denominator, or matching interval.
The GCF of zero and a nonzero integer is the absolute value of that integer. An LCM involving zero is conventionally zero because zero is a multiple of every integer.
No. GCF and LCM are reported as nonnegative values, so calculations use the integers' absolute values.
Your integer list is not saved by default or uploaded. You can opt into Remember on this device or download a local JSON backup.