Home / LCM & GCD Calculator

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

  1. Enter the numbers you want to compare.
  2. Choose the required calculation if the calculator provides separate LCM and GCD options.
  3. Review the resulting values.
  4. 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.

Explore more calculation resources

Keep exploring related tools, explanations, conversions, and topic pages in The Calc Studio. These links are selected around the subject of this page so you can move to the next useful calculation without returning to search.

Related calculators

  • Pythagorean Theorem Calculator — Find the hypotenuse of a right triangle from the two perpendicular sides.
  • Circle Calculator — Calculate circle area, circumference, and diameter from radius.
  • Average Calculator — Calculate the mean, median, mode, and range of any set of numbers.
  • 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.
  • Cone Volume Calculator — Calculate the volume and surface area of a cone.
Browse by categoryMath CalculatorsBusiness CalculatorsDate & Time CalculatorsEveryday ToolsConstruction CalculatorsFinancial Calculators

Task collections

  • Math & Statistics Calculators — Free math and statistics calculators for percentages, percentage-point change, interquartile range, averages, fractions, probability, standard deviation, z-scores, geometry, equations, and number systems.
  • Business & Work Calculators — Free calculators for business and work, including ROI, markup, break-even, sales commission, salary, overtime, VAT, depreciation, profit margin, and practical percentage calculations.
  • Calculators for Students — Free calculators for students, including grades, GPA, percentages, fractions, interquartile range, averages, probability, statistics, and scientific math.
  • Everyday Money Calculators — Free money calculators for salaries, overtime, discounts, VAT, sales tax, unit prices, rent splits, fuel costs, inflation, net worth, and other everyday calculations.

Related guides

  • CAGR Explained: Compound Annual Growth Rate — Learn the CAGR formula and how to use it to compare growth over multiple years.
  • How to Calculate a Z-Score — Learn how a z-score shows how far a value is from the mean in standard-deviation units.
  • How to Calculate Age from a Date of Birth — Learn how exact age is calculated using years, months, and days rather than a rough year difference.

Related terms

  • Budget — Learn what a budget is and how simple income-minus-expenses calculations can support planning.
  • Discount — Understand discounts, percent-off pricing, and how to calculate the amount saved and the final price.
  • Markup — Learn what markup means, how markup is calculated from cost and selling price, and how it differs from margin.

Useful conversions

  • °C to °F — Convert Celsius to Fahrenheit with a free temperature converter, formula, examples, and common temperatures.
  • °F to °C — Convert Fahrenheit to Celsius with a free temperature converter, formula, examples, and common temperatures.
  • cm to feet — Convert centimeters to feet with a free cm to feet converter, formula, examples, and a quick reference table.

Browse all calculators · Read all guides · Open the glossary · See all converters · Browse collections

Want to keep learning? Move from a calculator to its formula guide, glossary definition, unit conversion, or task collection to compare related methods and tools.

Optional Premium: save calculation history across visits and remove promotional blocks. See Premium.