GCD/LCM Calculator
Free online gcd/lcm calculator. Greatest common divisor and least common multiple. Accurate and easy to use.
GCD
6
LCM
36
GCD(12, 18) × LCM(12, 18) = 6 × 36 = 216
12 × 18 = 216
✓ Verified: GCD × LCM = a × b
Euclidean algorithm steps
18 = 1 × 12 + 6
12 = 2 × 6 + 0
GCD = 6
Embed this tool
Copy and paste the code below into your website to embed this tool for free. An attribution link to The Util Box is required.
<iframe src="https://www.theutilbox.org/embed/gcd-lcm-calculator" width="600" height="500" frameborder="0" style="border: none; max-width: 100%;" title="Free GCD/LCM Calculator tool from The Util Box"></iframe> <!-- Free tool by The Util Box — https://www.theutilbox.org/tools/gcd-lcm-calculator --> <a href="https://www.theutilbox.org/tools/gcd-lcm-calculator">GCD/LCM Calculator by The Util Box</a>
Frequently Asked Questions about GCD/LCM Calculator
GCD & LCM Calculator — With the Euclidean Algorithm Shown
This GCD and LCM calculator finds the greatest common divisor and the lowest common multiple of two to five numbers. A collapsible panel shows the Euclidean algorithm running step by step, which is the division-with-remainder method every textbook uses to find a GCD.
With exactly two numbers it also verifies the identity that ties the two together:
GCD × LCM = a × b.
How the Two Are Found
The GCD comes from the Euclidean algorithm: divide the larger number by the smaller, keep the remainder, and repeat with the divisor and the remainder until the remainder is zero. The last non-zero value is the GCD.
The LCM comes from the other identity: LCM = a × b ÷ GCD. For three or more
numbers the two are folded together one pair at a time, taking the GCD of the running total with the next
number and the LCM the same way.
The verification line deserves a caveat: GCD × LCM = a × b holds for two numbers, not for three or more. Four, six and eight have a GCD of 2 and an LCM of 24, and 2 × 24 = 48 rather than their product of 192. The tool only shows the check for a pair of numbers, where it is valid.
Honest Limits
- The Euclidean steps cover only the first two numbers, even when three or more are entered, since the running fold does not correspond to a single sequence of divisions.
- Only positive integers count. Zero and negative entries are filtered out before the calculation, so entering them silently reduces the number of values used rather than raising an error.
- At most five numbers, and at least two are needed for any result.
- No coprimality or lowest-terms flag, although the GCD itself is exactly the figure you would need for either.
Related Calculators
- Factor Finder — every divisor of a single number, and its prime factorisation.
- Prime Number Checker — a GCD of 1 means the numbers are coprime.
- Fraction Calculator — reducing fractions to lowest terms uses exactly this GCD.
- Decimal to Fraction — where the GCD does the reducing.
- Permutation & Combination Calculator — arrangements that depend on divisibility.
- Modulo Calculator — the remainder that the Euclidean algorithm is built on.
- Roman Numeral Converter — and the numeral system before Arabic.
Every calculation runs locally in your browser and works offline.