GCD & LCM Calculator
Greatest common divisor and least common multiple of two or more integers.
Every calculation runs locally in your browser.
Greatest common divisor
6
Least common multiple
720
Parsed 3 integers: 48, 18, 30
For informational and educational purposes only — not professional or technical advice, and not a substitute for consulting a qualified professional about your specific situation. TrueMeasureKit is not liable for decisions made based on these results. See our Terms of Service.
The Euclidean algorithm, in one line
To find the GCD of two numbers, repeatedly replace the larger with the remainder of dividing it by the smaller, until one of them hits zero — whatever's left is the greatest common divisor. It's one of the oldest algorithms still in everyday use, dating to Euclid's Elements around 300 BCE. The LCM then falls out almost for free: for any two numbers, their product always equals their GCD times their LCM, so dividing the product by the GCD gives the LCM directly, no searching required. For more than two numbers, both operations are applied pairwise across the whole list.
Frequently asked questions
What's the relationship between GCD and LCM?
For two numbers, their GCD × LCM always equals the product of the two numbers — which is a handy way to compute one from the other once you know the numbers themselves and either value.