Skip to main content
mathStandard Reference Formulas

GCD & LCM Calculator – Greatest Common Divisor

Find the Greatest Common Divisor (GCD/GCF) and Least Common Multiple (LCM) of two or more integers using Euclidean algorithm.

Greatest Common Divisor (GCD)
12
Largest shared divisor
Least Common Multiple (LCM)
720
Smallest shared multiple

How It's Calculated: The Exact Mathematical Formula

We display the exact algebraic formula used by our JavaScript engine so you can verify results manually.

Greatest Common Divisor (GCD) & Least Common Multiple (LCM)
LCM(a, b) = |a Γ— b| / GCD(a, b) (Euclidean Algorithm)

Computes the highest integer that divides both values and the lowest integer that is a multiple of both.

Euclidean GCD:Iterative remainder algorithm gcd(a, b) = gcd(b, a mod b)

Step-by-Step Worked Examples

GCD and LCM of 48 and 180Example #1

"Number theory simplification."

Given Inputs:
a:48
b:180
Calculation Steps:
  1. 180 mod 48 = 36
  2. 48 mod 36 = 12
  3. 36 mod 12 = 0 => GCD = 12
  4. LCM = (48 * 180) / 12 = 8,640 / 12 = 720
Final Output:GCD = 12, LCM = 720

Important Considerations & Limitations

  • β€’Applies to integers; non-integer decimals are rounded.

Frequently Asked Questions

Clear, practical answers to common questions about this calculation.

LCM is essential for finding common denominators when adding or subtracting fractions.

Related Calculators & Converters