Advertisement

GCD / LCM Calculator

Find the greatest common divisor and least common multiple of any set of numbers, with the working shown.

GCD and LCM

Enter two or more whole numbers. Results update live.

Enter at least two whole numbers.
Advertisement

How it computes

Pairs are folded left to right with Euclid's algorithm for the GCD, and each LCM comes from the identity lcm(a,b) = |a*b| / gcd(a,b). The step-by-step panel shows every pairwise reduction, so you can follow the exact working.

What GCD and LCM are for

The GCD simplifies fractions and finds common factors; the LCM finds common multiples for scheduling cycles, gear ratios and repeating events. Both accept any count of whole numbers, including negatives and zero.

GCD / LCM Calculator FAQs

Can I enter more than two numbers?
Yes. Any count works; pairs are combined left to right.
What if I enter zero?
GCD with zero returns the other number; LCM with zero is zero. Both are mathematically correct.
Does it accept decimals?
No. GCD and LCM are defined for integers, so decimals are rejected with a prompt to enter whole numbers.
Why show the steps?
Students and teachers use the pairwise working to check homework and understand Euclid's algorithm.
Is anything uploaded?
No. The math runs entirely in your browser.
Advertisement