GCD and LCM Calculator
Enter two or more whole numbers and get their greatest common divisor and least common multiple at once. Handy for simplifying fractions and finding common denominators.
Use the tool
Loading the tool…
About GCD and LCM Calculator
Find the greatest common divisor (GCD) and the least common multiple (LCM) of a list of whole numbers. Enter the numbers separated by spaces.
Worked example
Enter 12, 18 and 30. The tool shows a GCD of 6.
Limits
The tool works with whole numbers. Check the result for very large inputs.
How to use GCD and LCM Calculator
- Type or paste your whole numbers, separated by spaces, commas or new lines.
- Read the GCD and the LCM as they appear.
- Use Copy the result to keep the answer.
Good to know
- The GCD is the largest number that divides every number in the list without a remainder. The LCM is the smallest number that every number in the list divides into.
- Numbers must be whole numbers. Decimals and fractions are not accepted.
- Zero is allowed. The GCD of 0 and a number is that number, and the LCM involving 0 is 0.
- Very large numbers are calculated exactly, with no rounding.
Frequently asked questions
What is the GCD used for?
It is used to simplify fractions. Divide the top and bottom of a fraction by their GCD to get the simplest form.
What is the LCM used for?
It gives the smallest common denominator when you add fractions with different denominators.
Are my numbers saved?
No. The calculation happens in your browser and nothing is stored or sent to us.