LCM and GCD: Least Common Multiple and Greatest Common Divisor

LCM and GCD describe two relationships between integers: the least common multiple is the smallest positive shared multiple, and the greatest common divisor is the largest positive shared divisor. In brief: for 18 and 24, the GCD is 6 and the LCM is 72.

The names sound similar, but the calculations answer different questions. GCD helps divide existing quantities into matching groups, while LCM helps find a total or interval compatible with several repeating quantities. This guide uses positive integers, compares practical methods and explains how to choose the right answer in a word problem.

What is the difference between LCM and GCD?

A divisor is an integer that divides a number exactly. The greatest common divisor of two positive integers is the largest positive number dividing both. For 18 and 24, their common positive divisors are 1, 2, 3 and 6, so GCD(18, 24) = 6.

A multiple is a product of a number with an integer. The least common multiple is the smallest positive number that is a multiple of both inputs. The positive multiple lists for 18 and 24 first meet at 72, so LCM(18, 24) = 72.

The GCD cannot exceed the smaller positive input, while the LCM cannot be smaller than the larger input. These bounds provide a quick check against swapping the answers. GCD is also called greatest common factor, abbreviated GCF, and in some classrooms highest common factor, abbreviated HCF. Those names describe the same value.

Comparison of GCD and LCM for positive integers
FeatureGCDLCM
Looks forShared divisorsShared positive multiples
ChoosesLargest shared divisorSmallest shared positive multiple
For 18 and 24672
Size checkAt most the smaller inputAt least the larger input

How do you find LCM and GCD by listing?

To find the GCD by listing, write the complete positive divisor sets and identify their largest shared entry. For 20, the divisors are {1, 2, 4, 5, 10, 20}. For 30, they are {1, 2, 3, 5, 6, 10, 15, 30}. The shared entries are 1, 2, 5 and 10, giving GCD 10.

To find the LCM, list positive multiples in increasing order. For 20, write 20, 40, 60 and so on. For 30, write 30, 60 and so on. The first meeting is 60. Starting with the larger number’s multiples often reduces the search because you can test each candidate for divisibility by the smaller number.

Listing is easy to understand for small inputs, but long lists become inefficient. Factor lists must be complete if they are being used to justify the greatest divisor. Multiple lists can stop at the first shared positive value, provided all smaller relevant candidates have been checked. Zero is not an acceptable candidate for the least positive common multiple.

How do prime factors give the GCD and LCM?

Write both numbers as prime powers. For the GCD, keep only primes shared by both numbers and take the smaller exponent for each. The resulting product divides both inputs, and using any larger exponent would exceed the supply of that prime in at least one input.

For the LCM, keep every prime appearing in either number and take the larger exponent for each. The resulting product contains enough of every prime to be divisible by both inputs. A prime absent from one factorization can be treated as having exponent zero for comparison.

For 72 = 23 × 32 and 120 = 23 × 3 × 5, the GCD is 23 × 3 = 24. The LCM is 23 × 32 × 5 = 360. Keep the two rules separate: minimum exponents for the common divisor, maximum exponents for the common multiple.

Prime exponent choices for 72 and 120
PrimeExponent in 72Exponent in 120GCD exponentLCM exponent
23333
32112
50101

How do you calculate LCM and GCD step by step?

Find both values for 84 and 126. Their prime factorizations are 84 = 22 × 3 × 7 and 126 = 2 × 32 × 7. The shared primes are 2, 3 and 7, with minimum exponents all equal to 1.

The GCD is therefore 2 × 3 × 7 = 42. Taking maximum exponents gives the LCM as 22 × 32 × 7 = 252. Verify exact division: 84 ÷ 42 = 2 and 126 ÷ 42 = 3, while 252 ÷ 84 = 3 and 252 ÷ 126 = 2.

These checks establish that 42 is common and 252 is common, while the prime-exponent reasoning establishes greatest and least. Simply showing that a value divides both numbers does not prove it is the greatest common divisor; 7 also divides both. Similarly, 504 is a common multiple but is not the least one.

  1. Prime-factorize 84 and 126.
  2. Choose minimum prime exponents to calculate GCD 42.
  3. Choose maximum prime exponents to calculate LCM 252.
  4. Verify the divisor and multiple relationships with exact division.

What is the relationship between LCM, GCD and the product?

For two positive integers a and b, GCD(a, b) × LCM(a, b) = a × b. Consequently, after finding the GCD, calculate the LCM as (a ÷ GCD(a, b)) × b. Dividing first often keeps the intermediate numbers smaller than multiplying the original inputs immediately.

For 84 and 126, divide 84 by their GCD 42 to obtain 2, then multiply 2 × 126 = 252. The product check gives 42 × 252 = 10,584, which equals 84 × 126. This relationship lets the Euclidean algorithm for GCD support efficient LCM calculation too.

If the two inputs are coprime, their GCD is 1, so their LCM equals their product. If one input divides the other, the smaller is the GCD and the larger is the LCM. Do not extend the two-input product identity unchanged to three inputs: repeated pairwise calculations are the dependable approach for larger groups.

When should you use GCD and when should you use LCM?

Use GCD when dividing several existing quantities into the greatest possible number of identical groups with no leftovers. With 84 red beads and 126 blue beads, 42 identical groups are possible, each containing 2 red and 3 blue beads. Any permissible group count must divide both original counts.

Use LCM when finding the first positive coincidence of repeating intervals. If two signals occur every 18 and 24 seconds and coincide at time zero, their next coincidence is after 72 seconds. Both intervals must divide the elapsed time, so the desired time is a common multiple.

For fractions, the GCD helps reduce numerator and denominator, while the LCM provides the least positive common denominator for addition. For 18/24, dividing by GCD 6 gives 3/4. For denominators 18 and 24, denominator 72 works with the smallest positive shared multiple. The same inputs can support different tasks, so interpret the question before calculating.

What background explains these methods and which mistakes are common?

GCD and LCM belong to the basic study of integer divisibility. Their prime-factor methods rely on unique prime factorization, while the Euclidean algorithm finds a GCD through successive remainders. The two approaches emphasize different structure: one compares prime ingredients and the other preserves the common divisor set during reduction.

Common mistakes include always multiplying the inputs for LCM, always selecting the smaller input for GCD and reversing the minimum-and-maximum exponent rules. For 18 and 24, the product 432 is a common multiple, but not the least one; the smaller input 18 does not divide 24 and therefore is not their GCD.

Check both the relationship and the size. A proposed GCD must divide every input and be no larger than the smallest; a proposed LCM must be divisible by every input and be at least the largest. Those checks catch many errors, but proving greatest or least also requires a complete method such as factor comparison, ordered listing or a justified algorithm.

Frequently asked questions

Are GCD and GCF the same?

GCD and GCF name the same greatest common positive divisor. GCF emphasizes factors, while GCD emphasizes divisibility.

Is the LCM always the product of the numbers?

The LCM equals the product for two coprime positive integers. If they share a factor greater than 1, the LCM is smaller than the product.

What if one number divides the other?

The smaller number is their GCD and the larger number is their LCM. For 8 and 40, the GCD is 8 and the LCM is 40.

Can the GCD be 1?

The GCD is 1 when the inputs have no positive common divisor greater than 1. Such numbers are called coprime or relatively prime.

How do you calculate an LCM after finding the GCD?

For positive inputs a and b, calculate (a ÷ GCD(a, b)) × b. This is the two-number product identity rearranged to find the LCM.