LCM Calculator

Find the lowest common multiple of two or more whole numbers, with the working shown by prime factorisation and by the GCD method.

Reviewed by Dany, RightSums team · Updated

Runs in your browser. Free, no sign-up.

maths · Daily life · UK & US

Type two or more whole numbers and the calculator finds their lowest common multiple, also called the least common multiple. It shows the method two ways. First, it writes each number as a product of primes and multiplies the highest power of every prime. Second, it finds the greatest common divisor with Euclid's algorithm and uses LCM = a × b ÷ GCD, one pair at a time. For small answers it also lists the multiples so you can see where they first meet. The arithmetic uses exact whole numbers, so numbers with up to 40 digits give an exact answer. Prime factorisation is shown for numbers up to 10 to the power 15. It is a study aid: check how your teacher wants the method set out.

Accepted inputs

  • Two or more whole numbers, separated by commas, spaces or new lines

Outputs

  • Lowest common multiple
  • Prime factorisation of each number
  • Working by the GCD method
  • List of multiples for small answers
  • GCF of the same numbers

How to use the LCM Calculator

  1. Enter two or more whole numbers, separated by commas, spaces or new lines.
  2. The calculator writes each number as a product of primes and multiplies the highest power of every prime that appears.
  3. It also finds the GCD of each pair with Euclid's algorithm and divides the product of the pair by it.
  4. Both methods give the same answer, and the working for each is shown step by step.

Frequently asked questions

What is the LCM of 12 and 18?

The LCM of 12 and 18 is 36. As primes, 12 = 2² × 3 and 18 = 2 × 3². Take the highest power of each prime: 2² × 3² = 4 × 9 = 36. Check: 36 ÷ 12 = 3 and 36 ÷ 18 = 2.

How do you find the LCM using prime factorisation?

Write each number as a product of primes, then multiply the highest power of every prime that appears in any of them. For 8, 12 and 15: 8 = 2³, 12 = 2² × 3 and 15 = 3 × 5, so the LCM is 2³ × 3 × 5 = 120.

How do you find the LCM using the GCF?

Multiply the two numbers and divide by their greatest common factor. For 12 and 18 the GCF is 6, so the LCM is 12 × 18 ÷ 6 = 216 ÷ 6 = 36. For three or more numbers, find the LCM of the first two, then of that answer and the next number.

What is the LCM of 4, 6 and 8?

The LCM of 4, 6 and 8 is 24. The LCM of 4 and 6 is 12, and the LCM of 12 and 8 is 24. By primes, 2³ × 3 = 24. Listing multiples of 8 (8, 16, 24) shows 24 is the first one that 4 and 6 also divide.

What is the difference between LCM and GCF?

The LCM is the smallest number that all your numbers divide into; the GCF is the largest number that divides into all of them. For 12 and 18 the LCM is 36 and the GCF is 6. For two numbers, LCM × GCF equals their product: 36 × 6 = 216 = 12 × 18.

Related tools

  • Percentage Calculator

    Work out X% of a number, what percentage one number is of another, percentage increase or decrease, and a discounted price.

  • GCF Calculator (GCD and HCF)

    Find the greatest common factor (GCF), also called the GCD or HCF, of two or more whole numbers with Euclid's algorithm and prime factors.

  • Average Calculator

    Paste a list of numbers to get the mean, median, mode, range, count and sum, with the working, plus an optional weighted average.

  • Fraction Calculator

    Add, subtract, multiply and divide fractions and mixed numbers, then simplify and convert the answer to a mixed number, decimal and percentage.