GCD & LCM Calculator

Find the Greatest Common Divisor and Least Common Multiple of two numbers.

Enter two positive whole numbers.

Calculation Result

Greatest Common Divisor (GCD) 0
Least Common Multiple (LCM) 0

How to Find GCD and LCM

The Greatest Common Divisor (GCD) and Least Common Multiple (LCM) are useful when working with whole numbers, factors, multiples and fractions. This calculator finds both values for two positive whole numbers.

GCD and LCM Formula

The GCD is the largest positive integer that divides both numbers without a remainder. The LCM is the smallest positive integer that is divisible by both numbers.

For two positive numbers, the relationship between GCD and LCM can be expressed as:

GCD × LCM = First Number × Second Number

Example: GCD and LCM of 12 and 18

The factors of 12 include 1, 2, 3, 4, 6 and 12, while the factors of 18 include 1, 2, 3, 6, 9 and 18. The greatest common divisor is therefore 6.

The smallest positive number that is a multiple of both 12 and 18 is 36, so the LCM is 36.

Common Uses of GCD and LCM

GCD and LCM are commonly used in mathematics, fraction calculations, number theory, scheduling problems and situations where quantities need to be divided or combined into equal groups.

GCD & LCM Calculator FAQs

What is the GCD of 12 and 18?

The GCD of 12 and 18 is 6.

What is the LCM of 4 and 6?

The LCM of 4 and 6 is 12.

Can this calculator calculate GCD and LCM for decimals?

No. This calculator is designed for positive whole numbers and checks that both inputs are integers before calculating the results.

Can I enter zero?

No. The calculator requires positive whole numbers greater than zero. Entering zero or a negative number displays a validation message.

Use the free GCD & LCM Calculator above to quickly find the greatest common divisor and least common multiple of two positive whole numbers.

← All Tools | Math & Advanced Calculators

Related Math Calculators

You may also find these free math calculators useful:

Percentage Calculator | Fraction Calculator | Ratio Calculator | Average Calculator | Prime Number Checker

What Are GCD and LCM?

The GCD & LCM Calculator helps you find the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of two numbers. These concepts are commonly used in mathematics, fractions and number problems.

What Is the GCD?

The Greatest Common Divisor, or GCD, is the largest positive integer that divides two or more numbers without leaving a remainder.

For example, the GCD of 12 and 18 is 6 because 6 is the largest number that divides both 12 and 18 evenly.

What Is the LCM?

The Least Common Multiple, or LCM, is the smallest positive number that is a multiple of two or more numbers.

For example, the LCM of 4 and 6 is 12 because 12 is the smallest positive number that is divisible by both 4 and 6.

Why Use a GCD & LCM Calculator?

Finding GCD and LCM manually can take time, especially when working with larger numbers. This calculator provides quick results and can be useful for students, teachers and everyday mathematical calculations.

GCD & LCM Calculator FAQs

What does GCD stand for?

GCD stands for Greatest Common Divisor. It is the largest positive integer that divides two or more numbers without a remainder.

What does LCM stand for?

LCM stands for Least Common Multiple. It is the smallest positive number that is divisible by two or more numbers.

What is the GCD of 12 and 18?

The GCD of 12 and 18 is 6.

What is the LCM of 4 and 6?

The LCM of 4 and 6 is 12.

Use our free GCD & LCM Calculator above to find the greatest common divisor and least common multiple quickly.