Maths Number theory

LCM calculator

Whole numbers
Lowest common multiple 60
LCM 60 · GCD 2
Greatest common divisor 2
Numbers used 3
Their product 240
Live · Euclid’s algorithm, folded across the list

For any two numbers, LCM × GCD equals their product. With 4 and 6 that is 12 × 2 = 24. Seeing the pair together is the quickest way to sanity-check either one, and the GCD is what you need to reduce a fraction.

The lowest common multiple of a set of whole numbers is the smallest number that every one of them divides into exactly. For 4, 6 and 10 it is 60. The greatest common divisor is the largest number that divides into all of them, which here is 2. Both are computed with Euclid’s algorithm, applied pairwise across the list.

How to use it

1 Type two or more whole numbers, separated however you like.
2 The lowest common multiple appears at the top, with the greatest common divisor beneath it.
3 Decimals and negatives are rounded and made positive first, because neither has a common multiple in the usual sense.

The everyday use is adding fractions. To add 1/4 and 1/6 you need a common denominator, which is the lowest common multiple of 4 and 6: twelve, the smallest number both divide into. Using the product, 24, works as well and leaves you reducing afterwards.

Euclid’s algorithm, and why it is still the fastest

The greatest common divisor is found by replacing the larger number with the remainder of dividing it by the smaller, then repeating until the remainder is zero. For 60 and 48: 60 mod 48 = 12, then 48 mod 12 = 0, so the answer is 12. That method is around 2,300 years old and nothing has displaced it, because the number of steps grows with the number of digits and not with the size of the numbers. Doubling the digits roughly doubles the work, where trial division would square it. The list here is folded pairwise, so a long list costs one pass.

The relationship between the two numbers

For any two numbers, GCD × LCM equals their product, which makes each one a check on the other. It is worth knowing that this holds only for pairs. For 4, 6 and 10 the GCD is 2 and the LCM is 60, giving 120 against a product of 240, and that is where people most often come unstuck extending the shortcut to three numbers.

A GCD of 1 means the numbers are coprime: they share no factor other than one, and their LCM is simply their product. Two integers picked at random are coprime about 61 per cent of the time.

What people use it for

  • Finding the smallest common denominator before adding fractions by hand
  • Working out when two schedules on different cycles fall on the same day
  • Reducing a fraction with the greatest common divisor shown alongside
  • Finding how many turns before the same two gear teeth meet again
  • Checking whether two numbers share any factor at all

Questions

Yes. Highest common factor and greatest common divisor are two names for the same thing; British and American textbooks differ.

Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding