How to Use the GCD and LCM Calculator
Enter any number of whole numbers and get the greatest common divisor, the least common multiple, the prime factorisation of each, and whether the first two are relatively prime.
Step-by-Step Instructions
- 1 Enter two or more whole numbers separated by commas, spaces or new lines. Pasting a column from a spreadsheet works directly.
- 2 Read the GCD and the LCM together. Check them with the identity shown: multiplying the two must equal the product of your inputs.
- 3 Look at the prime factorisation of each number if you entered more than two, since the pattern usually makes the answer obvious.
- 4 For fractions, the GCD of the numerator and denominator is the number to divide both by to reduce the fraction.
- 5 With a single number entered, the result shows its prime factorisation and the full list of its divisors instead.
Understanding the Inputs
Numbers
Two or more whole numbers. Decimal entries and blanks are ignored rather than treated as zero, so a stray character cannot silently change your answer.
How to find it: Pairs of measurements for a shared tile size, repeating event intervals for a shared schedule, the numerator and denominator of a fraction to reduce, or a list of measurements to divide down together.
Why it matters: The GCD and LCM of a list are built by folding the values together one at a time, which is why any number of values gives a meaningful answer rather than needing a separate function per count.
Type: text · Default: 12, 18
Tips & Best Practices
- ✓ Check your work by confirming GCD times LCM equals the product of your inputs.
- ✓ Divide before multiplying when computing the LCM by hand, which keeps the intermediate number small.
- ✓ Use the GCD to reduce a fraction: divide top and bottom by it.
- ✓ Factorise large numbers, then take the minimum power for the GCD and the maximum for the LCM.
Try the GCD and LCM Calculator
by CalculatorPro Tools · Updated