Math & Numbers

GCD and LCM Calculator

Calculate the greatest common divisor and least common multiple for two or more positive integers.

Run tool

This online GCD and LCM calculator computes the greatest common divisor and least common multiple for any set of two or more positive integers. When working with fractions, simplifying ratios, or solving periodic scheduling problems, finding common factors and shared multiples is an essential step. Enter two or more positive whole numbers into the input field to evaluate their shared mathematical properties. The tool determines the greatest common divisor, which is the largest positive integer that divides every entered number without leaving a remainder. It also computes the least common multiple, which represents the smallest positive integer divisible by all supplied values. Alongside these two core values, the tool provides the numerical product of the greatest common divisor and least common multiple. Ensure that you supply at least two numbers and that every value converts to a strictly positive integer, as zero or negative values cannot be processed.

Instructions

  1. Enter two or more positive integers into the Numbers field.
  2. Click the calculate button to run the tool.
  3. Review the greatest common divisor, least common multiple, and their product in the results panel.

Examples

  • Numbers: 12, 18 -> Greatest Common Divisor: 6, Least Common Multiple: 36, Product: 216
  • Numbers: 8, 12, 20 -> Greatest Common Divisor: 4, Least Common Multiple: 120, Product: 480

FAQ

How many numbers can I enter at once?

You can calculate GCD and LCM for two or more numbers. Entering fewer than two numbers will not produce a valid calculation.

Can I calculate the GCD and LCM of negative numbers or zero?

No. The calculator requires positive integers greater than zero. Non-positive values or values that cannot be converted to integers will not calculate properly.

What is the relationship between GCD, LCM, and their product?

For any two positive integers, the product of their GCD and LCM equals the product of the two original numbers. The tool displays the calculated product alongside both values.

Embed this tool

Add this working SmartPlusLab tool to your website with the code below.