LCM GCD Calculator

Last updated: 2026-08-24

LCM GCD Calculator — Calculate least common multiple and greatest common divisor.
Inputs
Result
Enter values and press Calculate

How to use it

  1. {'step': 1, 'description': 'Apply Euclidean algorithm: 60 ÷ 48 = 1 remainder 12'}
  2. {'step': 2, 'description': 'Continue: 48 ÷ 12 = 4 remainder 0'}
  3. {'step': 3, 'description': 'GCD = 12 (last non-zero remainder)'}
  4. {'step': 4, 'description': 'LCM = (48 × 60) ÷ 12 = 240'}

Common mistakes

  • ⚠️ Using decimal numbers instead of integers for GCD/LCM
  • ⚠️ Confusing which is larger (LCM ≥ both numbers, GCD ≤ both numbers)
  • ⚠️ Forgetting that GCD is needed to calculate LCM efficiently

Worked example

Calculate LCM and GCD of 12 and 18.

The mcm ({mcm}) is the smallest number divisible by both inputs; mcd ({mcd}) is the largest number that divid is both inputs evenly.

Input guide

FieldTypical range
num1Positive integers only; typical: 1-10,000 for practical use
num2Positive integers only; same range as num1