GCD and LCM Calculator
Fill in the values and the answer updates as you type.
How the GCD and LCM Calculator works
GCD uses the Euclidean algorithm. LCM = |a × b| ÷ GCD.
Inputs and results
The GCD and LCM Calculator takes 2 inputs and gives 2 results.
What you enter
- First number — starts at 12.
- Second number — starts at 18.
What you get
- GCD
- LCM
Example: GCD and LCM Calculator with the starting values
With first number 12 and second number 18, the calculator returns:
| GCD | 6 |
|---|---|
| LCM | 36 |
Change any value above and the results update straight away.
GCD and LCM Calculator FAQ
How do I use the GCD and LCM Calculator?
Enter first number and second number in the fields, then read gcd and lcm in the result panel. The answer updates as you type, and you can press Calculate or Enter to refresh it. Use “Copy link” to share your exact numbers with someone else.
What does the GCD and LCM Calculator calculate?
Greatest common divisor and least common multiple. It returns gcd and lcm from the 2 values you provide.
What values does the GCD and LCM Calculator start with?
It opens with first number 12 and second number 18 so you can see a working result straight away. Replace them with your own numbers, or press Reset to return to these starting values.
Is the GCD and LCM Calculator free and private?
Yes. It is free, needs no account, and runs in your browser, so nothing you type is sent to or stored on our servers. See the Privacy Policy for details.
Can I rely on the GCD and LCM Calculator for important decisions?
Treat the result as a well-rounded estimate. Real situations often have details a general calculator cannot know, so confirm important decisions with a qualified professional. See the Disclaimer for more.