LCM LCM Calculator
Least Common Multiple · Free Math Tool
Instant · Free · No signup Works for 2–6 positive integers

GCD / HCF Calculator

Home » GCD Calculator

Greatest Common Divisor — also called Highest Common Factor (HCF). The largest positive integer that divides every number in your list with no remainder.

Enter numbers
Back to LCM
Result
—
Try 48, 18, 30 — GCD should be 6.

GCD and LCM travel together

Writing equations on a board

For any two positive integers a and b:

LCM(a, b) = |a × b| ÷ GCD(a, b)

So if you know one, you can get the other without listing multiples. This page uses the Euclidean algorithm (repeated remainder) — the same method taught in middle-school number theory, just automated.

Example: GCD(48, 18)

  1. 48 ÷ 18 = 2 remainder 12
  2. 18 ÷ 12 = 1 remainder 6
  3. 12 ÷ 6 = 2 remainder 0 → GCD is 6

Then LCM(48, 18) = 48 × 18 ÷ 6 = 144.