When two cycles line up again

Two things that repeat on different cycles coincide at the lowest common multiple of their periods. Buses running every 12 and every 18 minutes arrive together every 36 minutes, not every 216 — which is what multiplying the two periods would suggest, and it is six times too long because the two cycles share a factor of 6.

That relationship holds generally: the product of two numbers equals their lowest common multiple times their greatest common divisor. For 12 and 18 the product is 216, the LCM is 36 and the GCD is 6, and 36 × 6 = 216.

Where does this actually come up?

Anywhere two independent repeats have to be reasoned about together.

  • Timetables. Two services on different frequencies, and when the interchange works.
  • Gears. A 12-tooth gear driving an 18-tooth one returns both to their starting teeth after 36 tooth-engagements — three turns of the small gear and two of the large.
  • Maintenance. Tasks every 4, 6 and 10 weeks coincide every 60 weeks. Knowing that is the difference between a planned heavy week and a surprise one.
  • Fractions. Adding 1/4 and 1/6 needs a common denominator, and the lowest one is the LCM of 4 and 6 — twelve. The answer is 5/12.

The fraction case is the one most people meet first and recognise last. Using the product, 24, also works and leaves you reducing afterwards.

How is it calculated?

Through the greatest common divisor, using Euclid’s algorithm — the oldest algorithm still in everyday use, and the same procedure you would follow by hand.

To find the GCD of 12 and 18: divide 18 by 12, remainder 6; divide 12 by 6, remainder 0; the last non-zero remainder is 6. Then the LCM is the product divided by that: 12 × 18 ÷ 6 = 36.

For more than two numbers, apply it pairwise. The LCM of 4, 6 and 10 is the LCM of the LCM of 4 and 6 — twelve — with 10, which is 60. Their GCD is 2 and their product is 240, so the two-number identity does not extend to three; only the pairwise procedure does.

Doing it by hand on three or four numbers is quick; doing it on a list of a dozen is where the pairwise reduction earns its keep. Each step replaces two numbers with one, so twelve numbers take eleven applications of the same three-line procedure and never require factorising anything.

What happens when the numbers share nothing?

The LCM is the product and the GCD is 1. Two numbers with no common factor are called coprime, and 8 and 15 are an example: their LCM is 120 and their GCD is 1.

This is why prime frequencies are useful in engineering. A gearbox with a 13-tooth and a 40-tooth gear has coprime counts, so any given pair of teeth meets only once every 520 engagements — which spreads wear evenly instead of repeatedly grinding the same two teeth together. Choosing tooth counts that share no factors is a standard technique for exactly that reason.

Prime factorisation is the method taught in schools and it gives the same answer by a different route: break each number into primes, take the highest power of each prime that appears anywhere, and multiply. For 12 = 2²×3 and 18 = 2×3², that gives 2²×3² = 36. It is more illuminating and considerably slower, which is why the algorithm above is what a calculator runs.

Why is the lowest one the useful one?

Because any common multiple works and only the lowest is minimal. The buses also coincide at 72, 108 and 144 minutes; the question "when next" has one answer, and it is the smallest.

In fractions the same logic saves work rather than time. Adding 5/12 and 7/18 over the LCM of 36 gives 15/36 + 14/36 = 29/36, already in lowest terms. Over the product of 216 the same sum gives 174/216, which is correct and needs reducing by 6 to become the same fraction.

Is HCF the same as GCD?

Yes. Highest common factor and greatest common divisor are two names for the same quantity, with HCF the more common phrasing in British schools and GCD the one used in computing. Some texts also write GCF, greatest common factor. All three are identical.

The naming inconsistency is worth knowing about because a calculator labelled one way and a textbook labelled the other can look like they disagree when they do not.

Questions people ask

How many numbers can it take at once? As many as you can paste. The pairwise procedure extends indefinitely, and the answer grows quickly — the LCM of the numbers 1 to 10 is 2,520.

Does zero work? Not usefully. Every number divides into zero, so the LCM with zero is zero and the GCD with zero is the other number. Both are technically correct and neither answers a real question.

What about negative numbers? Sign is ignored. The multiples of −12 are the same set as the multiples of 12, so the LCM of −12 and 18 is 36.

Why is the product shown alongside? Because it makes the relationship visible. Seeing 216 next to 36 and 6 is what shows you that the shortcut of multiplying is not wrong, only wasteful.

The lowest common multiple answers "when next" and the greatest common divisor answers "how much do they share". The LCM calculator reports both alongside the product, the fraction calculator applies the same maths to a common denominator, and the scientific calculator handles whatever the answer turns out to be part of.