iGuideSmart

GCD & LCM Calculator

Find the Greatest Common Divisor and Least Common Multiple for two or more positive integers. 100% browser-based with explicit formula, worked examples, quick reference table, and FAQs.

GCD & LCM Results
GCD = 6 | LCM = 72
Evaluated for: 12, 18, 24

Formula & Calculation Logic

Computes the exact GCD using Euclid’s remainder algorithm and derives LCM without overflow via integer division.

Primary Formula

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

Example: Find GCD and LCM of 12 and 18

  1. 1
    Apply Euclidean algorithm for GCD
    gcd(18, 12) → gcd(12, 6) → gcd(6, 0)
    GCD = 6
  2. 2
    Divide product by GCD for LCM
    (12 × 18) ÷ 6
    LCM = 36

GCD & LCM Sample Number Pairs

Illustrative examples of Greatest Common Divisor and Least Common Multiple.

Showing 20 of 20 reference values
Sample pairs with GCD and LCM
Pair (a, b)GCD(a, b)LCM(a, b)Product (a × b)
(12, 18)636216
(8, 12)42496
(15, 25)575375
(24, 36)1272864
(14, 21)742294
(16, 24)848384
(18, 24)672432
(20, 30)1060600
(21, 28)784588
(25, 40)52001000
(30, 45)15901350
(36, 48)121441728
(42, 56)141682352
(48, 64)161923072
(54, 72)182163888
(60, 84)124205040
(75, 100)253007500
(80, 120)402409600
(90, 135)4527012150
(100, 150)5030015000

Practical Real-World Use Cases

Adding Unlike Fractions

Find the Least Common Denominator (LCM) before adding or subtracting fractions.

Event & Cycle Synchronization

Determine when two repeating maintenance or shift schedules next align.

Tiling & Packaging Grids

Use GCD to find the largest square tile that fits a rectangular room with zero cuts.

GCD & LCM Calculator – Frequently Asked Questions

What is the relationship between GCD and LCM?
For any two positive integers a and b, GCD(a, b) × LCM(a, b) = a × b.
What does it mean if GCD(a, b) = 1?
The numbers are coprime (relatively prime)—they share no prime factors other than 1, so LCM(a, b) = a × b.
Can I enter more than two numbers?
Yes! Separate any list of integers by commas or spaces to compute the group GCD and LCM.
View all Math Calculators →