Skip to content
Math

GCD and LCM calculator with prime factorisation

Find a shared divisor for simplifying numbers, or a shared multiple for matching repeating cycles. Enter two or more positive whole numbers to see both results and their prime factors.

Runs in your browser — your input is not uploaded to ToolsNow.

Two or more whole numbers, separated by spaces or commas.

Enter at least two whole numbers above zero.

The GCD is the largest whole number that divides every input. The LCM is the smallest positive multiple they share. Very large numbers can exceed the calculation’s precision.

How to use

  1. Enter the numbers. Separate values with spaces or commas. Use positive whole numbers without thousands separators.
  2. Read the two results. For 12, 18 and 24, the greatest common divisor is 6 and the lowest common multiple is 72.
  3. Check the prime factors. The factors show which parts the numbers share and which are needed to make a common multiple.

Questions

How does the GCD simplify a fraction?

Divide the numerator and denominator by it. The GCD of 12 and 18 is 6, so 12/18 becomes 2/3.

How can the LCM help with timing?

If two events start together and repeat every 12 and 18 minutes without interruption, their next shared occurrence is after 36 minutes, the LCM. Different start times need a separate check.

Why is the LCM not always the product?

Multiplication counts shared factors twice. For two positive integers, divide one by their GCD before multiplying by the other: 12 ÷ 6 × 18 = 36. Large inputs can still exceed the precision of the calculator.

Published by ToolsNow. How tools and sources are checked · Report a problem

Related tools