LCM calculator
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
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.
Twelve. Both divide by 12 exactly and nothing larger does, so 48/60 in lowest terms is 4/5.
Their product divided by their GCD. For more than two, take the LCM of the first pair, then of that result and the next number, and so on.
Replace the larger number with the remainder of dividing it by the smaller, and repeat until the remainder is zero. 60 mod 48 = 12, then 48 mod 12 = 0, so the answer is 12.
No, and this is where people come unstuck. For 4, 6 and 10 it gives 120 against a product of 240. The identity holds for pairs only.
As many as you like. The list is folded pairwise, so the LCM of a long list is found in one pass.
Their GCD is 1 and their LCM is their product. Numbers like that are called coprime; 8 and 15, for instance. Two integers picked at random are coprime about 61 per cent of the time.
No. Zero is skipped, because every number divides zero and the lowest common multiple would always be zero.
Adding 1/4 and 1/6 needs a common denominator, and the lowest common multiple of 4 and 6 is the smallest one that works: twelve. The GCD shown alongside is what reduces the answer afterwards.