GCD & LCM Calculator

Calculate the Greatest Common Divisor (GCD), also known as Highest Common Factor (HCF), and the Least Common Multiple (LCM) of two or more numbers. Uses the efficient Euclidean algorithm for fast computation. Essential for simplifying fractions and solving math problems.

Enter Numbers

Examples

Numbers: 12, 18

GCD: 6 | LCM: 36

Numbers: 24, 36

GCD: 12 | LCM: 72

Numbers: 15, 25

GCD: 5 | LCM: 75

Numbers: 8, 12, 16

GCD: 4 | LCM: 48

FAQ

What is GCD (Greatest Common Divisor)?

The GCD is the largest positive integer that divides two or more numbers without leaving a remainder. For example, GCD(12, 18) = 6 because 6 is the largest number that divides both 12 and 18 evenly.

What is LCM (Least Common Multiple)?

The LCM is the smallest positive integer that is divisible by all the given numbers. For example, LCM(4, 6) = 12 because 12 is the smallest number divisible by both 4 and 6.

How are GCD and LCM related?

For two numbers a and b: GCD(a,b) x LCM(a,b) = a x b. This relationship allows calculating one from the other efficiently. The Euclidean algorithm computes GCD quickly.

Related Tools