🧩

GCD & LCM Calculator

Find the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of any set of numbers.

GCD & LCM Calculator

Enter up to 10 numbers separated by commas.

About this calculator

Enter up to ten numbers and get their greatest common divisor, their least common multiple and the prime factorisation of each. Separate numbers with commas.

The GCD is used to reduce fractions and the LCM to add them, schedule repeating events and find common denominators.

How to use it

  1. Type up to ten whole numbers separated by commas.
  2. Read the GCD, the LCM and the prime factorisations.

Method

Using prime factorisation, the GCD takes the lowest power of each shared prime and the LCM takes the highest power of every prime. For two numbers, GCD × LCM = a × b.

Worked example

12, 18, 24

122 × 2 × 3
182 × 3 × 3
242 × 2 × 2 × 3
GCD6
LCM72

Tips and common mistakes

  • Use the LCM to find when repeating events coincide, such as buses every 12 and 18 minutes.
  • The GCD helps you simplify ratios and fractions.
  • Numbers with a GCD of 1 are called coprime.
  • For two numbers, check with GCD × LCM = product.
  • Enter whole numbers only.

Frequently asked questions

What is the GCD?

The largest number that divides all the given numbers.

What is the LCM?

The smallest number that all the given numbers divide into.

Are GCD and HCF the same?

Yes. HCF is the term used in Indian schools.

What is the GCD of 12 and 18?

6.

How do I find the LCM of three numbers?

Take the highest power of every prime in the factorisations.

What if one number is zero?

The GCD is the other number and the LCM is zero.

Related tools