LCM & GCD Calculator

This free online LCM and GCD calculator finds the Least Common Multiple and Greatest Common Divisor of two or more positive integers at once. Just list your numbers separated by commas and get both results instantly, worked out using the Euclidean algorithm.


How to Use the LCM & GCD Calculator

  1. Enter two or more positive integers, separated by commas, in the "Enter Two or More Positive Integers" field (e.g. 12, 18, 24).
  2. Click "Calculate".
  3. Read the GCD (Greatest Common Divisor) and LCM (Least Common Multiple) from the results table.

Frequently Asked Questions

It uses the Euclidean algorithm to find the GCD of the first two numbers, then repeats that pairwise with each remaining number. The LCM is calculated the same way using the formula LCM(a, b) = (a × b) / GCD(a, b) across all values.

Yes. You can enter as many comma-separated positive integers as you like, as long as there are at least two, for example 12, 18, 24.

The calculator only accepts positive integers. If any entry is a decimal, zero, or negative, it shows an error message naming the invalid value instead of a result.

Yes, it's completely free with no sign-up required.
No ratings yet — be the first!
Rate this calculator: