GCD & LCM Calculator

Find the greatest common divisor and least common multiple of two numbers.

About this tool

Find the greatest common divisor (GCD) and least common multiple (LCM) of two whole numbers — useful for simplifying fractions, scheduling problems, and basic number theory.

Key Features

  • GCD via the Euclidean algorithm
  • LCM computed from the GCD
  • Works with any two positive integers
  • Instant results

How to Use

  1. Enter two positive whole numbers.
  2. Click Calculate.
  3. Read the GCD and LCM.

Benefits

  • Simplify fractions to lowest terms
  • Solve scheduling and cycle problems
  • Check homework or programming assignment answers

Frequently Asked Questions

The GCD (greatest common divisor) is the largest number that divides both inputs exactly. The LCM (least common multiple) is the smallest number that both inputs divide into exactly. For example, GCD(24, 36) = 12 and LCM(24, 36) = 72.
LCM(a, b) = (a × b) ÷ GCD(a, b). This works because multiplying the two numbers counts their common factors twice, and dividing by the GCD removes the duplicate.
This calculator handles two numbers at a time. To find the GCD or LCM of three or more numbers, calculate it for the first two, then use that result together with the next number, repeating until all numbers are included.

Related Calculators

Related guides

Browse all Calculators