GCD & LCM Calculator
Hunting for the greatest common factor or least common multiple? Toss in your numbers and let us do the boring part.
๐ How it works & FAQWhat GCD and LCM actually tell you
The GCD (greatest common divisor, also called the greatest common factor) is the largest number that divides every value in your list evenly. The LCM (least common multiple) is the smallest number that every value divides into evenly. For 12 and 18, the GCD is 6 and the LCM is 36. This calculator finds both at once for as many numbers as you paste in, not just two.
When you'd reach for this
The GCD is what you use to reduce a fraction to lowest terms: 18/24 simplifies by dividing both by their GCD of 6, giving 3/4. The LCM is the common denominator you need to add fractions like 1/4 + 1/6 (LCM of 4 and 6 is 12). Outside of homework, LCM answers "when do two repeating cycles line up again?" โ buses leaving every 15 and 25 minutes meet again after 75 minutes; gears with 8 and 12 teeth realign every 24 teeth. GCD shows up when you want the biggest equal-sized tiles that fit a 48-by-36 wall (12 inches) with no cutting.
How it works under the hood
The tool uses the Euclidean algorithm โ repeatedly replacing the larger number with the remainder after dividing โ which finds the GCD quickly even for big numbers. The LCM then comes from the identity LCM(a, b) = a × b ÷ GCD(a, b). For three or more numbers it chains the operation pairwise, so GCD and LCM of a whole list stay exact.
How to use it
- Type or paste your numbers into the input box, separated by commas or spaces (for example, 24, 36, 60).
- Use positive whole numbers โ GCD and LCM aren't defined for fractions or decimals, so convert those first.
- Read off both the GCD and the LCM in the results, which update as you edit the list.
- Add or remove numbers to test a different set; there's no limit tied to just two values.
FAQ
- What's the difference between GCD and GCF?
- None โ greatest common divisor and greatest common factor are two names for the exact same number. Some textbooks also call it the highest common factor (HCF).
- Can I enter more than two numbers?
- Yes. Enter a full list and you'll get one GCD and one LCM that hold for every number in it.
- What if two numbers share no common factor?
- Then their GCD is 1 (they're "coprime"), and their LCM is simply the two numbers multiplied together.
- Is it free and private?
- Yes โ it's free and ad-supported, and every calculation runs inside your browser, so nothing you type is uploaded.