Skip to content
recaplica

    One moment: security check

    Cloudflare wants to make sure you're not a robot. Tick the box below and your search will continue on its own.

    IT
    recaplica Greatest Common Divisor: What It Is and How to Find It with Euclid's Algorithm
    © 2026 Recaplica · recaplica.com — All rights reserved
    Home › Science

    Greatest Common Divisor: What It Is and How to Find It with Euclid's Algorithm

    By Recaplica Newsroom · Updated on October 10, 2026

    What to print

    Page numbers appear when printing with default margins.

    Slides

    Choose a cut

    Flash10 slidesThe essential thread, to present in classFull15 slidesEvery chapter and the deeper detail

    Both come with speaker notes.

    Telegram channel
    recaplica Clear in 30 seconds, yours in 10 minutes.
    In 30 seconds Key points Figures Deep dive Slides Myths Mind map Quiz Flashcards FAQ

    In 30 seconds quick read

    The greatest common divisor (GCD) of two numbers is the largest natural number that divides both of them. Instead of listing out every divisor, Euclid's algorithm finds it with a sequence of divisions with remainder, repeated on the smaller and smaller pair of numbers each step produces. Run on 234 and 42, the algorithm reaches a GCD of 6 in four steps. The procedure already appears in Book VII of Euclid's Elements, written around 300 BCE, though in its original form it works by repeated subtraction rather than division.

    Key Points

    • GCD stands for greatest common divisor: the highest number that divides both terms of a pair without leaving a remainder.
    • Euclid's algorithm finds it through repeated division with remainder, with no need to list out divisors.
    • Run on 234 and 42, the algorithm reaches a GCD of 6 in four steps.
    • The property behind the method: the pair first number-second number shares the same GCD as the pair second number-remainder of their division.
    • Euclid describes the procedure in Book VII of the Elements, written around 300 BCE, but by repeated subtraction, not division.
    • A variant of the algorithm also plays a role in RSA encryption, according to Wikipedia.

    Key figures

    • 300 BCE Euclid describes the procedure for finding the greatest common divisor in Book VII of the Elements, written around this date. Source: Euclid, Elements, Book VII (circa 300 BCE)
    • 5 times A result from Gabriel Lamé: Euclid's algorithm stays within a step count of five per digit found in the smaller of the two numbers. Source: Gabriel Lamé, 1844

    Deep Dive

    The Common Divisor, and the Greatest of Them All

    A nonzero integer divides another number when it fits into it an exact number of times, with no remainder left over. When two numbers share one of these divisors, it’s called a common divisor. The greatest common divisor — the GCD — is the largest among these common divisors: the one natural number that divides both starting numbers and is, at the same time, the largest to do so.

    Taken on its own, the idea stays abstract. Tried out on two actual numbers, it clicks: 234 and 42 share the divisors 1, 2, 3 and 6, and the largest of these, 6, is their greatest common divisor. The GCD lives inside the natural numbers, the same domain described in number sets: there’s no point looking for it among numbers with a decimal point.

    Finding it by listing out divisors is manageable with small numbers, but the list gets unwieldy once the numbers grow large. That’s why a faster method exists, first described more than two thousand years ago — one of the oldest chapters of arithmetic.

    Euclid’s Algorithm, Step by Step

    Euclid’s algorithm finds the GCD without listing anything: it works through divisions with remainder, repeated on whatever pair of numbers the previous division produces. Run on 234 and 42, it goes like this:

    StepDivisionRemainder
    1234 = 42 × 5 + 2424
    242 = 24 × 1 + 1818
    324 = 18 × 1 + 66
    418 = 6 × 3 + 00

    The last nonzero remainder is 6: that’s the greatest common divisor of 234 and 42, the same number found a moment ago by listing divisors by hand.

    Worked example: for the GCD of 48 and 18, the same pattern repeats. 48 = 18×2+12, then 18 = 12×1+6, then 12 = 6×2+0. The remainder right before the zero is 6, so the GCD of 48 and 18 is 6.

    Why the Procedure Works

    The principle holding the whole algorithm together is this: the greatest common divisor of two numbers stays identical to the one formed by the second number and the remainder of dividing the two. The GCD of 234 and 42 equals the GCD of 42 and 24, because 234 can be written as 42×5+24: any number that divides both 234 and 42 also divides 24, and any number that divides 42 and 24 also divides 234, so the two sets of common divisors always coincide.

    Repeating the step, the pair of numbers shrinks every round, and the remainder keeps getting smaller. A sequence of natural numbers that keeps decreasing cannot go on forever: it has to reach zero after a finite number of steps. When it does, the last nonzero remainder is the greatest common divisor being sought.

    Older Than the School That Teaches It

    Euclid describes this procedure in Book VII of the Elements, written around 300 BCE. The book opens with a definition of the unit as the basis of the idea of number, and defines a number itself as a quantity made up of units: a smaller number “measures” a larger one when it is contained in it a whole number of times — another way of saying it divides it exactly.

    In Proposition 1 of Book VII, Euclid describes a test for whether two numbers share no common factor other than 1: the smaller is repeatedly subtracted from the larger, until only a unit is left. In Proposition 2, he tackles what we’d now call finding the greatest common divisor, using the same kind of repeated subtraction, down to a remainder that divides the one before it exactly — that remainder is the GCD being sought. The method taught today, with division, is a faster form of the same principle Euclid described through repeated subtraction: a division, after all, is nothing more than a subtraction repeated several times in a single step.

    Where It’s Used, Beyond Math Homework

    According to the Wikipedia entry “Euclidean algorithm,” the greatest common divisor of two numbers can always be expressed as a sum of the two starting numbers, each multiplied by a suitable integer, possibly negative: this is Bézout’s identity, and the two coefficients are found by retracing the algorithm’s steps backward, in a separate procedure from the one described above. Still according to Wikipedia, a variant of the same algorithm computes the modular inverse, a step used in the RSA encryption that protects online transactions. The algorithm is also efficient: Gabriel Lamé proved in 1844 that it takes at most five steps for every digit the smaller number has.

    Anyone studying algebra and Euclidean geometry runs into the same name, Euclid, through two different doors: the geometry of the Elements, and this arithmetic procedure — both born in the same treatise.

    Slide deck

    Slides ready to download and make your own in PowerPoint or Google Slides, with speaker notes. Pick the Flash cut or the Full one.

    Slide 1 of the presentation on Greatest Common Divisor: Greatest Common DivisorSlide 2 of the presentation on Greatest Common Divisor: What is the largest number that divides both 234 and 42?Slide 3 of the presentation on Greatest Common Divisor: From common divisor to 300 BCESlide 4 of the presentation on Greatest Common Divisor: Chapter 01: The common divisorSlide 5 of the presentation on Greatest Common Divisor: 1, 2, 3 and 6Slide 6 of the presentation on Greatest Common Divisor: Chapter 02: Euclid's algorithmSlide 7 of the presentation on Greatest Common Divisor: From 234 and 42 to a zero remainderSlide 8 of the presentation on Greatest Common Divisor: Chapter 03: Why it worksSlide 9 of the presentation on Greatest Common Divisor: The GCD isn't found only by breaking numbers into prime factors.Slide 10 of the presentation on Greatest Common Divisor: Chapter 04: History and applicationsSlide 11 of the presentation on Greatest Common Divisor: Who was EuclidSlide 12 of the presentation on Greatest Common Divisor: 300 BCE, five stepsSlide 13 of the presentation on Greatest Common Divisor: Elements, Book VIISlide 14 of the presentation on Greatest Common Divisor: What is the GCD of 234 and 42?Slide 15 of the presentation on Greatest Common Divisor: Now, for a review
    Flash10 slidesThe essential thread, to present in classFull15 slidesEvery chapter and the deeper detail

    Common myths

    • ✗ Myth Many people think the GCD can only be found by breaking numbers down into prime factors.

      ✓ Reality Factoring works fine for small numbers, but it gets slow for large ones. Euclid's algorithm reaches the same result using only division with remainder, without ever factoring anything.

    • ✗ Myth Some assume Euclid's algorithm is a modern method, born with electronic computing.

      ✓ Reality It is already described in Euclid's Elements, written around 300 BCE, in Book VII: the underlying principle is the same one used today, except that it originally worked by repeated subtraction rather than division.

    Mind map

    Drag the background to move around and the nodes to reposition them; use − and + to collapse and expand branches.

    Customize
    Mind map: Greatest Common Divisor: What It Is and How to Find It with Euclid's Algorithm
    • Greatest Common Divisor
      • Definition
        • Common divisor A number that divides both numbers exactly
        • The largest of all The GCD is the maximum among the common divisors
      • Euclid's algorithm
        • Division with remainder
        • Step repeated on the new pair
        • Last nonzero remainder This is the GCD being sought
      • Why it works
        • Same GCD at every step
        • Remainders always decreasing The sequence has to reach zero
      • History
        • Elements, Book VII Written around 300 BCE
        • Subtraction-based procedure Euclid's original form
      • Applications
        • Bézout's identity
        • RSA encryption Modular inverse, according to Wikipedia

    Quiz: test yourself

    Answer the questions to check what you have learned: you get instant feedback and a short explanation.

    Grade 0/10 0/5
    1 What is the greatest common divisor of two numbers?

    The GCD is the one natural number that divides both numbers and is the largest to do so.

    2 What is the GCD of 234 and 42, following Euclid's algorithm?

    The last nonzero remainder in the sequence of divisions (234 and 42, then 42 and 24, then 24 and 18, then 18 and 6) is 6.

    3 What does Euclid's algorithm rely on at every step?

    Each step takes the pair of numbers, carries out a division with remainder, and keeps only the remainder, until it reaches zero.

    4 True or false: the method Euclid describes in the Elements uses the same division-with-remainder steps taught in schools today.

    In Book VII, Euclid proceeds by repeatedly subtracting the smaller number from the larger one; schools instead use division with remainder, which reaches the same result in fewer steps.

    5 Which ancient work first describes the procedure for finding the GCD?

    The procedure appears in Book VII of Euclid's Elements, written around 300 BCE.

    Answers: 1-A · 2-A · 3-A · 4-B · 5-A

    Flashcards

    Tap the card to flip it and check whether you remember the answer, then move to the next one.

    1 / 7

    Explain it in your own words

    The ultimate test: if you can explain it in simple words, you've truly understood it. Write your explanation, then compare it with the Recap.

    Your explanation is saved only on this device.

    The greatest common divisor (GCD) of two numbers is the largest natural number that divides both of them. Instead of listing out every divisor, Euclid's algorithm finds it with a sequence of divisions with remainder, repeated on the smaller and smaller pair of numbers each step produces. Run on 234 and 42, the algorithm reaches a GCD of 6 in four steps. The procedure already appears in Book VII of Euclid's Elements, written around 300 BCE, though in its original form it works by repeated subtraction rather than division.

    Frequently asked questions

    What is the GCD in math?

    In mathematics, the greatest common divisor is the highest natural number that divides two given numbers without leaving a remainder.

    How do you find the GCD of two numbers using Euclid's algorithm?

    You run one division with remainder after another, moving each time to the pair formed by the divisor and the previous remainder; the last nonzero remainder is the GCD. This step — a division with remainder applied to the pair carried over from the previous one — is what some textbooks call Euclid's division algorithm, built on Euclid's division lemma. For 234 and 42 the result is 6, reached in four steps.

    Is Euclid's algorithm a recent invention?

    No. It is already described in Book VII of Euclid's Elements, written around 300 BCE, although the original version worked by repeated subtraction rather than division with remainder.

    What is the greatest common divisor used for, beyond math homework?

    The GCD of two numbers can be written as a combination of those two starting numbers (Bézout's identity), and Wikipedia notes that an adapted form of the same procedure computes the modular inverse, a building block of the RSA encryption used in online payments.

    Sources

    • Mathematics LibreTexts — The Euclidean Algorithm (Monroe Community College)
    • Euclid's Elements, Book VII (Clark University, D.E. Joyce)
    • Wikipedia — Euclidean algorithm

    Every Recap goes through an independent review before publication.

    Every evening, the day's new Recaps on our Telegram channel. Join the channel →

    Keep learning

    • Science Correlation: What It Means and How to Read the Coefficient Correlation measures how closely two variables move together, and the most common way to put a number on it is the correlation coefficient, which runs from -1 to +1. A value near +1 means the two variables rise together, near -1 means one rises while the other falls, and near 0 means no linear relationship stands out. The coefficient only captures the strength of a straight-line relationship, and a single unusual data point can push it up or down by a lot. Even when it's strong, a correlation between two variables never shows that one causes the other. Read the Recap →
    • Science Light Refraction: What It Is, the Laws Behind It, and Examples A surface that separates two transparent materials sends some light back, reflecting it, and lets the rest through while bending it toward a new direction. The law of reflection keeps the incoming and outgoing angles equal, both measured from the normal to the surface. Snell's law governs refraction instead, linking the index of each material to how much the ray tilts before and after it crosses over. These two laws alone explain mirrors, lenses, prisms and everyday sights such as a pencil that appears to snap inside a glass of water. Read the Recap →
    • Science Total Internal Reflection and the Critical Angle: Definition and Formula Total internal reflection is what happens when a light ray stops being able to leave a transparent medium and gets sent back inside it completely. It takes place past a specific angle of incidence, called the critical angle, calculated with Snell's law by comparing the refractive indices of the two materials involved. It only happens under one precise condition: the ray must be traveling from an optically denser medium into a less dense one, such as from water into air or from glass into air. Optical fibers and, in part, the sparkle of diamonds rely on this same principle. Read the Recap →

    recaplica

    Clear in 30 seconds, yours in 10 minutes.

    Recaps Mind maps Request a Recap Telegram channel Mind map maker Our method About Privacy & cookies Legal notes & terms of use

    © 2026 Recaplica · A project by Curi S.r.l. — VAT IT05472000750

    Statistics, only if you say so

    To learn which Recaps help most we would use Google Analytics, with aggregate, anonymous data. It starts only with your OK, and you can change your mind anytime. Privacy policy