Math calculator
GCD & LCM Calculator
Find the greatest common divisor and least common multiple of two integers.
How this calculation works
GCD uses Euclid’s algorithm; LCM(a,b) = |a × b| ÷ GCD(a,b). Use the calculator above to enter your values. Inputs are checked before a result is shown, and calculations run locally in your browser.
GCD(12, 18) = 6; LCM = 36
Frequently asked questions
How does the gcd & lcm calculator work?
GCD uses Euclid’s algorithm; LCM(a,b) = |a × b| ÷ GCD(a,b).
What is an example using the gcd & lcm calculator?
GCD(12, 18) = 6; LCM = 36
Can I enter decimal values?
Yes. Enter decimal values where appropriate. The calculator checks required inputs and displays a readable result.
Are results rounded?
Results are formatted for readability. Check the displayed formula and units when using the result.
Related math guides
Keep calculating
