LCM and GCD Calculator
Find the least common multiple and greatest common divisor of a list of whole numbers. Enter two or more integers and read both results, computed with Euclid’s method so the answer is exact. A free LCM and GCD calculator that runs in your browser, with no sign-up.
- Exact, step-by-step answers
- 100% free
- No sign-up, no app
- Instant as you type
- Works offline after first load
How to use it
- 1
Enter whole numbers
Type two or more integers, separated by commas or spaces. Negative numbers are treated by their size.
- 2
Read both results
The greatest common divisor and least common multiple appear instantly, side by side.
- 3
Use the answer
Use the GCD to simplify a fraction, or the LCM to find a common denominator or a repeating cycle.
When it comes in handy
Simplifying fractions
Use the greatest common divisor of the numerator and denominator to reduce a fraction to lowest terms.
Common denominators
Use the least common multiple of the denominators to add or compare fractions cleanly.
Schedules and cycles
Find when two repeating events line up again by taking the least common multiple of their periods.
Instant, exact & 100% in your browser
The maths runs right here in your browser, with fractions and whole numbers kept exact rather than rounded along the way. Nothing you type is sent to a server, there is no sign-up and no limit, and once the page has loaded it keeps working even with no connection.
Frequently asked questions
- What is the difference between LCM and GCD?
- The greatest common divisor (GCD) is the largest number that divides every value in your list with no remainder. The least common multiple (LCM) is the smallest number that every value divides into. GCD is used to simplify fractions; LCM is used to find common denominators.
- How is the GCD calculated?
- It uses Euclid’s method: repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder is zero. The last non-zero value is the GCD. For a list, the GCD is found two numbers at a time. The method is exact and very fast.
- How are LCM and GCD related?
- For two numbers, their LCM times their GCD equals the product of the numbers, so LCM = (a × b) ÷ GCD. That relationship is how the calculator finds the LCM efficiently once it has the GCD, and it extends across a whole list.
- Does this work offline and is anything sent to a server?
- The calculation runs entirely in your browser, so nothing you type is sent anywhere, and once the page has loaded it keeps working with no connection. There is no sign-up and no limit on how many calculations you make.