Advertisement

LCM & HCF Calculator

Find

Enter your numbers and press Calculate. The answer and the working behind it will show up here.

LCM — Least Common Multiple—
HCF — Highest Common Factor—
Working out
Advertisement

LCM and HCF, with four working methods

Enter two or more whole numbers and get both the Least Common Multiple and Highest Common Factor at once, with a choice of how the working is shown — prime factorisation, the division ladder, listing, or Euclid's algorithm.

How to use

  1. Enter your numbers separated by commas, spaces or line breaks
  2. Press Calculate to get both LCM and HCF
  3. Switch the method dropdown to see the working done a different way

Common questions

How many numbers can I enter at once, and how large can each be?

Up to 12 numbers per calculation, each at most 1,000,000,000,000 (10¹²). The LCM itself is computed with BigInt, so it stays exact even when it runs to well over a hundred digits for a full list of large numbers.

Which working method should I pick — prime factorisation, division, listing or Euclid?

Prime factorisation and the division ladder both scale to any size and are the standard textbook approaches. Listing is capped automatically once the multiples or factors would run too long to be readable (LCM above 3,000, or any number above 1,000). Euclid's algorithm is the fastest by hand and is what the tool falls back on internally for large pairs.

What happens if I enter 0 as one of the numbers?

It's rejected — every number divides 0, so there's no single lowest common multiple to find. Enter numbers of 1 or above.