How to use the GCF Calculator
Enter two or more whole numbers separated by commas or spaces. The result is the largest number that divides all of them exactly.
The Euclidean method
To find the GCF of 48 and 18, divide the larger by the smaller and keep the remainder: 48 ÷ 18 leaves 12. Repeat with 18 and 12, which leaves 6, then 12 and 6, which leaves 0. The last non-zero remainder, 6, is the GCF. It is fast even for very large numbers.
Where you use it
The GCF simplifies fractions: 48/18 divided by 6 on top and bottom is 8/3. It also helps split things into equal groups. If you have 48 red and 18 blue tiles and want identical rows with no leftovers, you can make 6 rows, each with 8 red and 3 blue.
Common factors, step by step
Every common factor of two numbers divides the GCF exactly. The common factors of 24 and 36 are 1, 2, 3, 4, 6 and 12, and the greatest is 12. Listing factors works for small positive integers, but for large ones the Euclidean method is far quicker, because it never needs to find every factor.
The formula
Euclidean algorithm: GCD(a, b) = GCD(b, a mod b)
Examples
- GCD of 48, 180 and 84
GCD(48, 180, 84) = 12
- GCD of 54 and 24
GCD(54, 24) = 6
- GCD of 17 and 31
GCD(17, 31) = 1
Limitations and assumptions
Computed in your browser with standard double-precision arithmetic unless the page says otherwise. Very large or very small values may be rounded.
Frequently asked questions
What is the GCF?
The greatest common factor is the largest whole number that divides each of the numbers without a remainder. It is also called the greatest common divisor (GCD) or highest common factor (HCF).
How do I find the GCD by hand?
Use the Euclidean algorithm: divide the larger number by the smaller, replace the larger with the remainder, and repeat until the remainder is zero.
What if the GCD is 1?
The numbers are coprime, meaning they share no factor other than 1.
How is it related to the LCM?
For two numbers, GCD × LCM equals their product.