LCM & GCD Calculator
The LCM & GCD Calculator finds the Least Common Multiple and Greatest Common Divisor of numbers. These concepts are useful in arithmetic, fractions, divisibility problems, repeating schedules, and other mathematical calculations.
How to use this calculator
- Enter the numbers you want to compare.
- Choose the required calculation if the calculator provides separate LCM and GCD options.
- Review the resulting values.
- Use the result to solve related fraction, divisibility, or scheduling problems.
LCM and GCD relationship
For two positive integers a and b: LCM(a,b) × GCD(a,b) = a × b
- The Greatest Common Divisor is the largest positive integer that divides each input without leaving a remainder.
- The Least Common Multiple is the smallest positive integer that is a multiple of all the input values.
- Prime factorization provides one mathematical method for finding both values, while algorithms such as the Euclidean algorithm provide an efficient way to find the GCD.
Worked examples
Example: GCD of 12 and 18
Both 12 and 18 are divisible by 6, and no larger positive integer divides both.
GCD(12, 18) = 6
The Greatest Common Divisor is 6.
Example: LCM of 4 and 6
The positive multiples of 4 include 4, 8, 12, 16, while multiples of 6 include 6, 12, 18.
LCM(4, 6) = 12
The Least Common Multiple is 12.
Understanding the result
GCD is useful when you need to simplify a fraction or find the largest equal grouping of items.
LCM is useful when several repeating cycles need to align again, such as schedules that repeat at different intervals.
For two positive integers, the product relationship between LCM and GCD provides a useful way to check the result.
Important notes
Be clear about whether you need the common divisor or common multiple before interpreting the result.
Negative or zero inputs may require special handling depending on the mathematical convention used by the calculator.
For fractions, the GCD can help simplify the numerator and denominator before further calculations.
Frequently asked questions
What does GCD stand for?
GCD stands for Greatest Common Divisor, the largest positive integer that divides each input without a remainder.
What does LCM stand for?
LCM stands for Least Common Multiple, the smallest positive number that is a multiple of all the specified values.
When would I use LCM?
LCM is useful when you need to find when repeating intervals or cycles will coincide, and it is also commonly used when working with fractions that have different denominators.
Related calculators
- Circle Calculator — Calculate circle area, circumference, and diameter from radius.
- Pythagorean Theorem Calculator — Find the hypotenuse of a right triangle from the two perpendicular sides.
- Test Grade Calculator — Calculate the score needed on a final assessment to reach a target overall grade.
- Arc Length Calculator — Calculate circular arc length and sector area from a radius and central angle in degrees.
- Average Calculator — Calculate the mean, median, mode, and range of any set of numbers.
- Cone Volume Calculator — Calculate the volume and surface area of a cone.
Related explanations
Learn the method behind the number or compare the terminology before using the calculator.
- CAGR Explained: Compound Annual Growth Rate — Learn the CAGR formula and how to use it to compare growth over multiple years.
This page provides a calculation tool plus explanatory information so you can understand what the result means and when the underlying method may not fit your situation.