Returns the greatest common divisor of two or more integers.
GCD(integer1, integer2, ... integer30)
integer1 to integer30 are up to 30 integers or ranges of integers whose greatest common divisor is to be calculated.
The greatest common divisor (or highest common factor) is the largest positive integer which will divide, without remainder, each of the given integers.
GCD(16, 32, 24)
returns 8, because 8 is the largest number that can divide 16, 24 and 32 without a remainder.
GCD(B1:B3)
where cells B1, B2, and B3 contain 9, 12, and 6 returns 3.
GCD(3, 5)
returns 1.
Tiling a Rectangular Floor
Imagine you're a tile installer and you have a rectangular room that you need to tile. The room is 12 feet long and 9 feet wide. You want to cover the entire floor with the largest possible square-shaped tiles, without having to cut any tiles.
To find the size of the largest possible square tile, you need to find the greatest common divisor of the length and the width of the room.
The GCD of 12 and 9 will give us the side length of the largest square tile that can perfectly fit into the room's dimensions.
A divisor is a number that divides another number evenly, with no remainder.
The common divisors are the numbers that appear in both lists.
The greatest common divisor is the largest number from the list of common divisors.
This means the largest square tile you can use without cutting any is 3 feet by 3 feet.
The following table helps visualize how the tiles fit perfectly.
Dimension | Divisors | ||
|---|---|---|---|
A | B | ||
1 | Length (12 ft) | 1, 2, 3, 4, 6, 12 | |
2 | Width (9 ft) | 1, 3, 9 | |
3 | Greatest Common Divisor (GCD) | 3 |
Since the GCD is 3, you can use 3x3 foot square tiles.
This results in a perfect grid of 4 tiles by 3 tiles, for a total of 4×3=12 tiles, with no cuts needed.
PRODUCT & FEATURES
RESOURCES
Terms | Privacy | Spam Policy
© 2026 Zapof