Finding the Greatest Common Divisor and the Least Common Multiple in Excel
A greatest common divisor is the largest integer that divides evenly into each number in a set of numbers. In other words, it divides with no remainder. Take the numbers 5, 10, and 100. The greatest common divisor is 5 because each of the numbers divided by 5 returns another integer (no decimal portion).
The GCD function takes up to 255 values as its arguments. Noninteger values are truncated. By its nature, any returned greatest common divisor must equal or be smaller than the lowest argument value. Often, there is no greatest common divisor other than 1 — which all integers share. The syntax of the GCD function follows:
The least common multiple is an integer that is the lowest multiple common among a group of integers. For example, the least common multiple of 2, 4, and 6 is 12. The least common multiple of 9, 15, and 48 is 720.
The LCM function takes up to 255 values as its arguments. Noninteger values are truncated. The syntax of the LCM multiple function follows: