GCF Calculator
Find the greatest common factor (GCF), also called the greatest common divisor (GCD), of up to 5 numbers. Enter whole numbers and the calculator returns the GCF using the Euclidean algorithm. The GCF is the largest positive integer that divides evenly into all the inputs.
GCF examples
| Numbers | GCF |
|---|---|
| 12, 18 | 6 |
| 24, 36 | 12 |
| 15, 25 | 5 |
| 20, 30, 40 | 10 |
| 7, 11 | 1 |
GCF calculator: frequently asked questions
What is the greatest common factor (GCF)?
The greatest common factor, also called the greatest common divisor (GCD), is the largest positive integer that divides evenly into two or more numbers. For example, the GCF of 12 and 18 is 6, because 6 is the largest number that divides both 12 and 18.
How do I find the GCF?
Use the Euclidean algorithm: divide the larger number by the smaller, then repeatedly divide the previous divisor by the remainder until the remainder is zero. The last non-zero remainder is the GCF. Alternatively, find all factors and identify the largest common one.
When would I use the GCF?
GCF is used to simplify fractions, reduce ratios, divide items into equal groups, and solve problems involving shared factors.
What is the GCF of two prime numbers?
If two numbers are both prime and different, their GCF is 1 because they share no common factors other than 1. For example, GCF(7,11) = 1.
What is the difference between GCF and LCM?
GCF is the largest number that divides both, while LCM is the smallest number divisible by both. For 12 and 18: GCF = 6, LCM = 36.
Official sources
- Euclidean algorithm for calculating the greatest common divisor (standard mathematical algorithm).
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.