
Use our Greatest Common Factor (GCF) Calculator above to find the largest positive integer that divides each of your numbers without a remainder. For example, the GCF of 24 and 36 is 12. You can use that result to simplify a fraction, reduce a ratio, or divide items into equal groups.
This guide explains how to use the calculator, what the result means, and how to check it by listing factors, using prime factorization, or applying the Euclidean algorithm.
How to Use the GCF Calculator
- Enter the whole numbers you want to compare in the calculator above.
- Calculate the result. The GCF is the largest positive integer that divides every number you entered exactly.
- Apply or check the result. Divide each original number by the GCF. Each division should leave no remainder.
For example, enter 24 and 36. The result is 12: 24 ÷ 12 = 2 and 36 ÷ 12 = 3. If you are simplifying 24/36, those quotients give the reduced fraction 2/3.
If you want to build a calculator like this for your own website, you can use our no-code form builder with calculations.
What Is the Greatest Common Factor?
The greatest common factor (GCF), also called the greatest common divisor (GCD) or highest common factor (HCF), is the largest positive integer that divides two or more integers exactly.
A factor divides a number without leaving a remainder. Common factors are factors shared by all the numbers you are comparing.
For example:
Factors of 8 → 1, 2, 4, 8
Factors of 12 → 1, 2, 3, 4, 6, 12
Common factors → 1, 2, 4
GCF = 4
The GCF is one number, not a list of every common factor. For positive integers, it cannot be larger than the smallest number in the set. If the only common factor is 1, the numbers are called coprime.
Simplify Fractions and Ratios with the GCF
To simplify fractions, divide the numerator and denominator by their GCF. This reduces the fraction to its lowest terms in one step.
For example, simplify 14/21:
GCF(14, 21) = 7
14 ÷ 7 = 2
21 ÷ 7 = 3
14/21 = 2/3
The same process works when you simplify ratios. For example, the GCF of 9 and 12 is 3, so dividing both parts of 9:12 by 3 gives 3:4. The proportions stay the same.
How to Find the Greatest Common Factor by Hand
These three methods help you understand or check a GCF calculator result. Listing factors works well for small numbers; prime factorization shows the shared building blocks; the Euclidean algorithm is usually more efficient for larger numbers.
1. Listing Method
List the positive factors of each number, identify the common factors, and choose the greatest one.
Example: GCF of 20 and 40
Factors of 20 → 1, 2, 4, 5, 10, 20
Factors of 40 → 1, 2, 4, 5, 8, 10, 20, 40
Common factors → 1, 2, 4, 5, 10, 20
GCF = 20
Here, 20 divides 40 exactly. Whenever the smaller positive number divides the larger one, the smaller number is their GCF.
2. Prime Factorization Method
Write each number as a product of primes. Take only the prime factors shared by every number, using the lowest exponent of each shared prime, then multiply them.
Example: GCF of 24 and 36
24 = 23 × 3
36 = 22 × 32
Shared prime factors at their lowest powers → 22 × 3
GCF = 12
Using the lowest powers matters: 24 contains three factors of 2, but 36 contains only two. Only two factors of 2 can be shared.
3. Division (Euclidean) Method
Divide the larger number by the smaller number and note the remainder. Then replace the pair with the previous divisor and that remainder. Repeat until the remainder is 0. The last nonzero divisor is the GCF.
Example: GCF of 360 and 198
360 = 198 × 1 + 162
198 = 162 × 1 + 36
162 = 36 × 4 + 18
36 = 18 × 2 + 0
GCF = 18
You can check the answer: 360 ÷ 18 = 20 and 198 ÷ 18 = 11. Both divisions are exact.
How to Find the GCF of Three or More Numbers
Find the GCF of the first two numbers, then find the GCF of that result and the next number. Continue until you have included every number.
For example, find the GCF of 18, 24, and 30:
GCF(18, 24) = 6
GCF(6, 30) = 6
GCF(18, 24, 30) = 6
A factor shared by only two of the numbers is not enough: it must divide every number in the set.
When Is the GCF Useful?

The GCF helps you reduce quantities while keeping their relationship unchanged, or find the largest equal division with nothing left over.
- Fractions: Reduce a numerator and denominator to lowest terms.
- Ratios: Express proportions using smaller whole numbers.
- Algebra: Identify a shared numerical factor. For example, 12x + 18 = 6(2x + 3).
- Programming: GCD algorithms support exact fraction arithmetic, modular arithmetic, and cryptography (see GCD in software engineering).
Real-Life Applications of the Greatest Common Divisor

- Making identical groups: Suppose you have 36 apples and 24 oranges. GCF(36, 24) = 12, so you can make at most 12 identical baskets with no fruit left over. Each basket contains 3 apples and 2 oranges.
- Cutting equal lengths: For example, two ribbons measuring 84 cm and 126 cm can be cut into equal pieces of at most 42 cm without waste, because GCF(84, 126) = 42.
- Finding common denominators: For positive integers a and b, LCM(a, b) = (a × b) ÷ GCF(a, b). For example, LCM(8, 12) = 96 ÷ 4 = 24, so 24 is the lowest common denominator for fractions with denominators 8 and 12.
- Computer calculations: Programs can reduce an exact fraction by dividing both stored integers by their GCD (read more at GeeksforGeeks).
Common GCF Mistakes to Avoid
- Stopping at any common factor: Both 2 and 6 divide 18 and 24, but only 6 is the greatest common factor.
- Confusing factors with multiples: A factor divides a number; a multiple is the result of multiplying it by an integer. GCF and LCM answer different questions.
- Including unshared prime factors: In prime factorization, use only primes present in every number, with their lowest shared exponents.
For related calculations, our math calculator collection includes other tools for working with numbers.
FAQs About the Greatest Common Factor
What’s the easiest way to find the GCF?
For a quick answer, enter your numbers in our online GCF calculator above. By hand, listing factors is straightforward for small numbers, while the Euclidean algorithm usually takes fewer steps for larger numbers.
Are GCF and GCD the same thing?
Yes. Greatest common factor and greatest common divisor describe the same value. Highest common factor, or HCF, is another name for it.
What’s the difference between GCF and LCM?
The GCF is the largest positive integer that divides all the given numbers. The least common multiple (LCM) is the smallest positive integer that is a multiple of all of them. For example, 8 and 12 have a GCF of 4 and an LCM of 24.
What does a GCF of 1 mean?
It means the numbers have no positive common factor other than 1. For example, GCF(8, 15) = 1. A fraction formed from those numbers is already in lowest terms.
Can the GCF be greater than the smallest number?
For positive integers, no. The GCF is at most the smallest number. For example, GCF(12, 24) = 12.
Why is the Euclidean algorithm used in computer science?
It finds the GCD through repeated division with remainders, without needing to factor the original numbers into primes. This makes it useful for efficient integer calculations.
Who developed the Euclidean algorithm?
Euclid described the algorithm in his Elements more than 2,000 years ago. It remains a standard method for finding the greatest common divisor.
Wrapping Up
The greatest common factor is the largest positive integer shared as a factor by every number in a set. Use the calculator for a quick result, or check it by listing factors, using prime factorization, or applying the Euclidean algorithm. Once you have the GCF, you can simplify fractions and ratios or work out the largest equal grouping without leftovers.