GCD of multiple numbers
Enter three or more whole numbers and see their greatest common divisor, with the steps: the GCD of the first two, then of that result and the next number, and so on.
Whole numbers, separated by a semicolon, comma or space.
Fill in the fields; the answer appears here straight away.
How it's worked out
How it works
-
Enter the values
Type the numbers or the formula. Decimals may use a point or a comma. No idea? Click Fill in an example.
-
Instant answer
The answer appears as you type, with the most important intermediate values.
-
See the working
Under "How it's worked out" you see the steps, handy for checking your own calculation.
How does it work with more numbers?
The GCD of several numbers is found step by step, because GCD(a, b, c) = GCD(GCD(a, b), c). For 84, 126 and 210:
- GCD(84, 126) = 42
- GCD(42, 210) = 42
So 42 is the largest number that divides all three. If the GCD reaches 1 along the way, the answer is 1: the numbers have no common factor.
When is it useful?
To simplify a ratio (84 : 126 : 210 = 2 : 3 : 5), to find the largest tile size that fits several lengths, or to share several amounts into equal groups. For two numbers with Euclid's steps, use the GCD calculator. For the smallest common multiple, use the LCM calculator.
Two more examples
- 48, 180 and 300: GCD(48, 180) = 12, then GCD(12, 300) = 12. The answer is 12.
- 15, 28 and 45: GCD(15, 28) = 1, so the answer is 1 straight away.
Practical uses
- Equal baskets: 24 apples, 36 oranges and 60 pears can be shared over at most GCD = 12 identical baskets, with 2 apples, 3 oranges and 5 pears in each.
- Tiles: a floor of 360 × 240 cm is covered by square tiles with a side of at most 120 cm, since GCD(360, 240) = 120.
- Ratios: dividing 84 : 126 : 210 by 42 gives 2 : 3 : 5.
For only two numbers, with every step of Euclid's algorithm, use the GCD calculator.
Frequently asked questions
Does the order of the numbers matter?
No. GCD(a, b, c) is the same in any order, so 84, 126, 210 and 210, 84, 126 give 42.
How do I separate the numbers?
With a semicolon, a comma or a space, as in 84; 126; 210. Whole numbers only.
What does it mean if the answer is 1?
The numbers have no common divisor other than 1. Be aware that some pairs may still share a factor: 6, 10 and 15 have GCD 1, although each pair shares one.
How is this related to the LCM?
The GCD is the largest number that divides all of them, the LCM the smallest number that all of them divide. For three or more numbers the neat product rule of two numbers no longer holds, so use the [LCM calculator](/en/math/lcm-calculator) for that.