GCD & LCM Calculator

Mathematics

This number theory utility determines the greatest common divisor and least common multiple for any pair of integers. Enter your chosen whole numbers to find their largest shared factor and smallest common multiple for scheduling, fraction reduction, or modular arithmetic.

Calculated Result
GCD = 12 Β· LCM = 720

Greatest Common Divisor & Least Common Multiple for 48, 180

GCD (Greatest Divisor)
12
LCM (Least Multiple)
720
Product a Γ— b
8640
Formula: LCM(a, b) = (|a Γ— b|) / GCD(a, b) via Euclidean algorithm

About this calculator

Synchronizing repetitive cycles and simplifying complex algebraic fractions both depend directly on finding common divisors and multiples between distinct integers. Typical inputs are two positive whole numbers representing item counts, gear teeth counts, machine rotation frequencies, or recurrence intervals in operational scheduling. The calculation identifies the largest integer that evenly divides both numbers without a remainder, alongside the smallest non-zero multiple shared by both values.

Outputs present the greatest common divisor and least common multiple side by side for direct analytical comparison. The greatest common divisor reveals the optimal grouping size for partitioning resources without leftover items, while the least common multiple marks the precise interval when periodic processes align. As a practical caveat, note that inputs must be non-zero integers; negative numbers are evaluated by absolute magnitude, and zero cannot serve as a valid divisor in modular arithmetic calculations.

How It Works & Formula

FormulaLCM(a, b) = (|a Γ— b|) / GCD(a, b)

The greatest common divisor is computed efficiently using the Euclidean algorithm, which iteratively replaces the larger number by the remainder of its division with the smaller number until the remainder reaches zero. The least common multiple is subsequently derived from the identity LCM(a, b) = (|a Γ— b|) / GCD(a, b). This relationship guarantees that the product of the GCD and LCM equals the product of the original integers.