GCF & LCM Calculator

Find the Greatest Common Factor (GCF) and Least Common Multiple (LCM) of two or more numbers. Works with any number of integers.

GCF (Greatest Common Factor)
LCM (Least Common Multiple)
Numbers:

Formulas

GCF using Euclidean Algorithm
GCF(a, b) = GCF(b, a mod b) until b = 0
LCM from GCF
LCM(a, b) = |a × b| / GCF(a, b)

Examples

Numbers: 12, 18

GCF = 6 | LCM = 36

12 = 2×2×3, 18 = 2×3×3 → shared: 2×3 = 6

Numbers: 8, 12, 20

GCF = 4 | LCM = 120

FAQ

Use GCF when simplifying fractions (divide numerator and denominator by the GCF). Use LCM when finding a common denominator to add or subtract fractions, or when finding when two periodic events will coincide.

Quick Tip

To simplify a fraction like 18/24, divide both by GCF(18, 24) = 6, giving you 3/4.