← Math Concepts

GCD and LCM

Use the greatest common divisor when you need the largest size that fits several quantities exactly. Use the least common multiple when you need the first positive total that several quantities divide evenly.

Key Ideas

Choose the operation

GCD is also called GCF, the greatest common factor. It finds the largest equal piece size with no leftovers. LCM is the smallest positive common multiple, useful when cycles that start together need to line up again.

Compare prime exponents

Write each number as a product of primes. Treat a missing prime as having exponent zero. For the GCD, use the smallest exponent for each prime. For the LCM, use the largest.

Use the product rule for two numbers

For two positive integers a and b, GCD(a, b) × LCM(a, b) = a × b. For example, 12 and 18 have GCD 6 and LCM 36, and both products equal 216.

Divide out the shared factor

When two numbers have GCD g, divide both by g. The results are coprime, meaning their GCD is 1. Their product is the original LCM divided by g. This helps you rebuild possible pairs.

Go Further

Find the GCD by repeated division

For GCD(84, 30), divide 84 by 30 to get remainder 24. Next, 30 divided by 24 leaves 6. Finally, 24 divided by 6 leaves 0. The last nonzero remainder, 6, is the GCD. See Remainders for more on what division leaves over.

Try It Yourself

1. The Largest Square Tiles

A rectangular board is 60 cm wide and 36 cm high. Cover it exactly with identical square tiles placed in straight rows and columns. The tile side length must be a whole number of centimeters. What is the largest possible side length, and how many tiles will fit?

The square tile’s side length must divide both dimensions.
Show hint

Find the greatest common divisor of 60 and 36. Then count how many tiles fit along each side.

Show solution

The greatest common divisor is 12 cm. The board fits 60 ÷ 12 = 5 tiles across and 36 ÷ 12 = 3 down, for 15 tiles.

2. Record Both Signals

At the start of a robotics demo, two signals flash together. One then flashes every 8 seconds and the other every 12 seconds. A camera begins recording 50 seconds after the start. When will it first record both signals flashing together?

Both signals start at time zero. Look for a shared flash time after the camera starts.
Show hint

Find the time between shared flashes. Which multiple of it comes just after 50?

Show solution

The LCM of 8 and 12 is 24. Shared flashes occur at 24, 48, 72, and so on. The camera first records both at 72 seconds after the demo starts, or 22 seconds after recording begins.

3. The Closest Pair

Two positive integers have GCD 8 and LCM 240. Find the pair with the smallest difference.

Factoring out the shared 8 makes it easier to compare possible pairs.
Show hint

After dividing both numbers by 8, their product is 240 ÷ 8. List the factor pairs of that product.

Show solution

The reduced pair has product 30. Its factor pairs are (1, 30), (2, 15), (3, 10), and (5, 6). The closest pair is (5, 6), and those numbers are coprime. Multiplying back by 8 gives 40 and 48, with a difference of 8.

Watch Next

Factors, Multiples, GCF and LCM

Review greatest common factors and least common multiples with Shark Academy.

Watch on Bilibili · Watch on YouTube