LCM & GCF Calculator
Find the greatest common factor and least common multiple of a list of integers. Exact integer arithmetic preserves large results, while each pairwise step shows how the answer was obtained.
Your result
How the calculation works
GCF(a,b) uses repeated Euclidean divisions until the remainder is zero. LCM(a,b) = |a / GCF(a,b) × b| for nonzero inputs. Fold both operations across the list.
Worked example
For 12, 18 and 30, the GCF is 6 and the LCM is 180. For 12 and 18: 18 = 1 × 12 + 6; 12 = 2 × 6 + 0.
Assumptions and limitations
Enter 2–50 integers with at most 30 digits each. Signs are ignored. GCF(0,0) and an all-zero list return 0; any zero makes the LCM 0. No floating-point rounding is used.
LCM helps find common denominators and repeating schedules; GCF helps divide quantities into equal groups. This is distinct from simplifying a two-part ratio.
Method reviewed 2026-10-13. Calculation standards · Report an issue