Calculate the GCD and LCM of two integers

With GCD and LCM, students, teachers and analysts can verify a calculation during study or analysis. Calculate the GCD and LCM of two integers.

Calculate the GCD and LCM of two integers. Use it free in your browser without creating an account, then review the result before moving to the next step.

How to use

  1. Enter the first integer on the first line of the input field.
  2. Write the second integer on the next line without adding extra text or mixing the two numbers.
  3. Run the calculation to get the GCD and LCM of the two values you entered.
  4. Compare both results with your own factor method or with the exercise statement.
  5. Clear the field to test another pair of integers or fix a typing mistake.

Example

With the integers 84 and 126, the tool calculates the greatest common divisor and the least common multiple. Check that both results match your expectation, then reuse them to simplify a fraction or align two denominators.

Input

84
126

Limits and formats

Where processing happens

The calculation runs locally in your browser. The two integers you enter are not sent to any service and stay on your device during the operation. No account is needed to check a GCD or LCM quickly.

Frequently asked questions

What is the difference between GCD and LCM?

The GCD is the largest number that divides both integers without a remainder. The LCM is the smallest number divisible by both integers. They are useful for simplifying fractions or finding a common denominator.

Can I use negative numbers?

The tool expects integers, but sign conventions can differ between contexts. If your exercise follows a specific rule, verify the result against your course material before using it.

Does the tool show the steps?

No, it displays the GCD and LCM without explaining the method. For schoolwork, redo the factorisation or algorithm required by your teacher, then use these values as a check.

Tools in the same category