The best examples of examples of greatest common divisor (GCD) examples

If you’ve ever stared at a math problem about factors and thought, “Why do I care how numbers divide each other?”, you’re in the right place. The fastest way to make sense of the greatest common divisor (GCD) is to walk through clear, concrete examples of how it works. In this guide, we’ll focus on real, worked examples of examples of greatest common divisor (GCD) examples, from simple classroom-style pairs like 12 and 18 to more realistic situations involving schedules, packaging, and even cryptography. Instead of drowning you in formal definitions, we’ll build intuition step by step. You’ll see how to find the GCD by listing factors, using prime factorization, and applying the Euclidean algorithm. Along the way, we’ll connect these examples to modern uses in 2024–2025 math education, computer science, and problem-solving. By the end, you won’t just recognize a GCD problem—you’ll know exactly how to attack it and why it matters.
Written by
Taylor
Published

Starting with simple classroom-style GCD examples

Let’s warm up with some of the best examples of greatest common divisor (GCD) examples that students usually meet first. These are the “training wheels” problems that build your instincts.

Take the numbers 12 and 18. An example of finding the GCD by listing factors goes like this: list all positive divisors of each number.

  • Divisors of 12: 1, 2, 3, 4, 6, 12
  • Divisors of 18: 1, 2, 3, 6, 9, 18

The common divisors are 1, 2, 3, and 6. The greatest of these is 6, so the GCD(12, 18) = 6. This is one of the classic examples of greatest common divisor (GCD) examples you’ll see in any intro number theory class.

Now try 20 and 30. Their divisors are:

  • Divisors of 20: 1, 2, 4, 5, 10, 20
  • Divisors of 30: 1, 2, 3, 5, 6, 10, 15, 30

The common divisors are 1, 2, 5, and 10. The GCD(20, 30) = 10.

Already, two patterns show up:

  • The GCD is always one of the smaller numbers’ divisors.
  • If one number divides the other exactly, that smaller number is the GCD. For example, GCD(7, 21) = 7 because 7 goes into 21 with no remainder.

These early examples of examples of greatest common divisor (GCD) examples are simple, but they set the mental model: “What’s the biggest number that divides both?”


Prime factorization: cleaner GCD examples for bigger numbers

Listing every divisor gets annoying fast once numbers grow. Prime factorization gives cleaner examples of greatest common divisor (GCD) examples, especially for teaching.

Example: GCD of 60 and 84

Break each number into prime factors:

  • 60 = 2 × 2 × 3 × 5 = 2² × 3 × 5
  • 84 = 2 × 2 × 3 × 7 = 2² × 3 × 7

To find the GCD, look at the primes they share and take the lowest power of each shared prime:

  • Both have 2²
  • Both have 3
  • Only 60 has 5, and only 84 has 7, so those are ignored.

So GCD(60, 84) = 2² × 3 = 4 × 3 = 12.

This is one of the best examples to show why the definition makes sense: the GCD is built from the building blocks (primes) they share.

Example: GCD of 72 and 120

Let’s do another example of using prime factors.

  • 72 = 2 × 2 × 2 × 3 × 3 = 2³ × 3²
  • 120 = 2 × 2 × 2 × 3 × 5 = 2³ × 3 × 5

Shared primes with their minimum powers:

  • 2³ is in both
  • 3¹ is in both

So GCD(72, 120) = 2³ × 3 = 8 × 3 = 24.

This kind of factorization example of GCD is especially helpful when students are already comfortable with primes. It also connects nicely to later topics like least common multiple (LCM) and simplifying fractions.

For a formal discussion of prime numbers and divisibility, math departments like MIT OpenCourseWare offer freely accessible lecture notes and problem sets.


Euclidean algorithm: fast GCD examples for big numbers

In real math problem solving, especially in 2024–2025 computer science and cryptography, nobody is listing factors of 10-digit numbers by hand. The Euclidean algorithm is the workhorse. It’s also a great source of real examples of GCD in action.

The idea is simple: repeatedly subtract or divide and take remainders until you hit zero. The last non-zero remainder is the GCD.

Example: GCD of 252 and 198

Use division with remainder:

  1. 252 ÷ 198 = 1 remainder 54, so GCD(252, 198) = GCD(198, 54).
  2. 198 ÷ 54 = 3 remainder 36, so GCD(198, 54) = GCD(54, 36).
  3. 54 ÷ 36 = 1 remainder 18, so GCD(54, 36) = GCD(36, 18).
  4. 36 ÷ 18 = 2 remainder 0, so the process stops.

The last non-zero remainder is 18, so GCD(252, 198) = 18.

This is one of the best examples of greatest common divisor (GCD) examples to show in a classroom when you want students to see an algorithm that scales.

Example: GCD of 1,001 and 143

This one looks random, but it’s a nice example of how the algorithm stays fast.

  1. 1,001 ÷ 143 = 7 remainder 0.

So GCD(1,001, 143) = 143. One step, done. It turns out 143 × 7 = 1,001 exactly.

If you’re curious about how this algorithm underpins modern cryptography, you can find a more advanced treatment in number theory and cryptography courses like those linked from Harvard’s math resources.


Real examples of GCD in everyday problem solving

So far, the examples of examples of greatest common divisor (GCD) examples have been pure numbers. Let’s translate that into real-world style problems you might see in textbooks, contests, or even day-to-day planning.

Example: Cutting ribbon into equal pieces

You have a 36-foot ribbon and a 24-foot ribbon. You want to cut both into pieces of equal length, with no leftover ribbon, and you want the pieces as long as possible.

This is exactly a GCD problem:

  • GCD(36, 24) = 12.

So the longest possible piece length is 12 feet.
You’ll get 3 pieces from the 36-foot ribbon and 2 pieces from the 24-foot ribbon.

This is a classic real example of GCD: maximizing equal size while avoiding waste.

Example: Arranging tiles in a rectangular pattern

Suppose you have 45 blue tiles and 30 white tiles, and you want to arrange them in identical rows, with each row containing only one color, and no tiles left over.

The number of tiles per row must divide both 45 and 30. So we look for the GCD:

  • GCD(45, 30) = 15.

You can make rows of 15 tiles. That gives you 3 rows of blue tiles and 2 rows of white tiles.

Here the GCD gives the largest row size that works for both colors.

Example: Synchronizing repeating events

Imagine two events:

  • A bus route that repeats every 18 minutes.
  • A train schedule that repeats every 30 minutes.

If you want to know how often they line up at the station in the same pattern of minutes, you’re really thinking about multiples and common divisors. The GCD(18, 30) = 6.

Why does 6 matter? Because you can think of both schedules as built from 6-minute blocks:

  • 18 minutes = 3 × 6
  • 30 minutes = 5 × 6

The 6-minute unit is the largest “time chunk” that fits evenly into both schedules. This is one of those subtle examples of greatest common divisor (GCD) examples where the GCD is hiding behind a more obvious LCM (least common multiple) question.


GCD and simplifying fractions: the most practical example of all

If you’ve ever reduced a fraction in school, you’ve already used GCD without naming it. Many teachers in 2024–2025 explicitly connect fraction simplification to the GCD to help students see the structure.

Example: Simplifying 42/56

To simplify 42/56, you divide top and bottom by their greatest common divisor.

  • GCD(42, 56) = 14.

So:

[
\frac{42}{56} = \frac{42 ÷ 14}{56 ÷ 14} = \frac{3}{4}.
]

This is one of the best examples of examples of greatest common divisor (GCD) examples for middle school students, because it ties directly into something they already do.

Example: Simplifying 150/210

Find the GCD first.

  • 150 = 2 × 3 × 5²
  • 210 = 2 × 3 × 5 × 7

Shared primes: 2 × 3 × 5 = 30. So GCD(150, 210) = 30.

Then:

[
\frac{150}{210} = \frac{150 ÷ 30}{210 ÷ 30} = \frac{5}{7}.
]

This kind of example of GCD is standard in modern curricula and appears in many state and national standards. For more on how fractions and divisors are taught in U.S. schools, you can browse resources from the Institute of Education Sciences.


GCD in 2024–2025: coding, cryptography, and contest math

The greatest common divisor is not just a classroom relic; it shows up constantly in modern problem solving.

Example: GCD in programming

In coding interviews and online judges (think LeetCode, Codeforces, etc.), you’ll see problems like:

Given a list of integers, find the largest integer that divides all of them.

Under the hood, an efficient solution repeatedly applies the Euclidean algorithm. A typical pattern in code is:

  • Start with g = first_number.
  • For each next number x, update g = gcd(g, x).
  • At the end, g is the GCD of the entire list.

If you’re practicing algorithmic thinking, real examples of GCD-based problems often involve simplifying ratios, checking if a fraction can be reduced to 1, or verifying if two numbers are coprime (their GCD is 1).

Example: GCD and cryptography

Modern public-key cryptosystems, like RSA, rely heavily on properties of divisibility. While the full theory is advanced, even a simple example of GCD helps illustrate a key idea: if two numbers share a non-trivial GCD (greater than 1), they are not “independent” in the way cryptographers want.

For instance, if you accidentally choose two RSA moduli that share a prime factor, computing the GCD of the moduli exposes that shared factor—a serious security issue. Security researchers routinely compute GCDs of large numbers to test for this kind of weakness.

This is one of the most modern, real examples of greatest common divisor (GCD) examples, connecting school math to internet security. For a more formal background, you can look at introductory cryptography notes from universities hosted on .edu domains, such as those linked from Stanford’s computer science pages.

Example: GCD in contest problems

Math competitions like AMC, AIME, and various international contests love GCD. A typical style of problem:

Find the greatest integer \(k\) such that \(k\) divides both \(a^n - 1\) and \(b^n - 1\).

While the full solution can get technical, the heart of it is often a clever use of GCD properties and the Euclidean algorithm. These are more advanced examples of examples of greatest common divisor (GCD) examples, but they grow naturally from the simple two-number cases you’ve already seen.


Multi-number GCD examples

So far, we’ve mostly stuck to pairs. But you can absolutely talk about the GCD of three or more numbers. The trick is to do it step by step.

Example: GCD of 24, 60, and 36

You can use the fact that:

[
\gcd(a, b, c) = \gcd(\gcd(a, b), c).
]

First, find GCD(24, 60):

  • 24 = 2³ × 3
  • 60 = 2² × 3 × 5

Shared primes: 2² × 3 = 12, so GCD(24, 60) = 12.

Now find GCD(12, 36):

  • 12 = 2² × 3
  • 36 = 2² × 3²

Shared primes: 2² × 3 = 12, so GCD(12, 36) = 12.

So GCD(24, 60, 36) = 12.

This is a neat example of GCD when you’re dealing with multiple quantities, like three different lengths of rope you want to cut into equal pieces.

Example: GCD of 45, 75, and 105

Again, go step by step.

First, GCD(45, 75):

  • 45 = 3² × 5
  • 75 = 3 × 5²

Shared primes: 3 × 5 = 15, so GCD(45, 75) = 15.

Now GCD(15, 105):

  • 15 = 3 × 5
  • 105 = 3 × 5 × 7

Shared primes: 3 × 5 = 15, so GCD(15, 105) = 15.

Therefore, GCD(45, 75, 105) = 15.

These multi-number examples of greatest common divisor (GCD) examples are especially handy in word problems about grouping or packaging different quantities into identical sets.


FAQ: common questions about GCD examples

Q1. Can you give more examples of greatest common divisor (GCD) with real-life meaning?
Yes. Any time you want to split things evenly or standardize sizes, you’re looking at a GCD-style problem. Examples include cutting boards of different lengths into equal planks, dividing land into equal plots, or creating equal-sized data packets from files of different sizes in computing.

Q2. What is an example of two numbers whose GCD is 1?
Numbers like 8 and 15 have GCD(8, 15) = 1. They share no prime factors, so they’re called coprime. Another example of coprime numbers is 14 and 25. These examples include pairs where the only common divisor is 1.

Q3. How do I quickly find the GCD of big numbers without listing factors?
Use the Euclidean algorithm: repeatedly divide and take remainders until you reach 0. The last non-zero remainder is the GCD. This method is fast enough that it’s used inside computer algorithms and calculators. Many educational sites, including university math departments such as those linked from UCLA’s math pages, show worked examples.

Q4. Are there examples of GCD used outside pure math and coding?
Yes. In science and engineering, GCD ideas show up when simplifying ratios, scaling models, and working with periodic phenomena. In statistics and public health, you’ll sometimes see integer ratios simplified using GCD to make data easier to interpret, even if the word “GCD” isn’t explicitly mentioned. Agencies like CDC or NIH often present data as simplified ratios or rates, which conceptually rely on the same idea.

Q5. How many examples of greatest common divisor (GCD) should I practice to feel confident?
You don’t need hundreds. A solid mix of 10–20 problems that include small numbers, larger numbers, word problems, and a few Euclidean algorithm exercises is usually enough to build real confidence. Focus on understanding why each step works, not just memorizing procedures.


When you step back, all these examples of examples of greatest common divisor (GCD) examples tell the same story: the GCD is the largest shared building block of your numbers. Whether you’re cutting ribbon, simplifying fractions, or writing code in 2025, that simple idea keeps showing up—and now you’ve seen it from every angle.

Explore More Number Theory Problem Solving

Discover more examples and insights in this category.

View All Number Theory Problem Solving