GCF Calculator
Find the greatest common factor of two or three numbers, with divisor lists and the Euclidean algorithm shown step by step.
GCF Calculator — input your values
What does this math calculator do?
The GCF calculator finds the greatest common factor (also called the greatest common divisor or highest common factor) of two or three numbers. It lists the divisors of every number, highlights the ones they share, and picks the largest — the approach used in textbooks.
It then confirms the answer with the Euclidean algorithm, a fast ancient method that repeatedly replaces the larger number with the remainder of division. You see both methods side by side, which builds confidence in the result and teaches how the algorithm works.
Formula and variables
The Euclidean algorithm repeats the step gcd(a, b) = gcd(b, a mod b) until the remainder is zero; the last non-zero remainder is the gcd.
| Symbol | Meaning |
|---|---|
| a, b | The two numbers |
| a mod b | The remainder when a is divided by b |
| gcd | Greatest common divisor |
Worked example
Simplify the fraction 48/72 by finding the GCF of 48 and 72.
- Divisors of 48: 1, 2, 3, 4, 6, 8, 12, 16, 24, 48.
- Divisors of 72: 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72.
- The greatest common divisor is 24, so 48/72 = (48 ÷ 24)/(72 ÷ 24) = 2/3.
Answer: The GCF is 24, and 48/72 simplifies to 2/3.
Tips and common mistakes
Tips
- Use the GCF to reduce fractions: divide numerator and denominator by it to get the simplest form in one step.
- To find the GCF of more than two numbers, chain the operation: gcd(a, b, c) = gcd(gcd(a, b), c).
- The Euclidean algorithm is far faster than listing divisors when numbers get large — it uses only subtraction-like steps.
- The GCF of two numbers with no common prime factors is 1; they are called coprime or relatively prime.
Common mistakes to avoid
- Listing only prime divisors and forgetting composite divisors like 4 or 6, which can be the answer.
- Using the smallest common divisor instead of the greatest.
- Entering a decimal value — the GCF is defined only for whole numbers.
GCF Calculator — frequently asked questions
What is the difference between GCF and GCD?
None — they are two names for the same thing. GCF (greatest common factor) and GCD (greatest common divisor) are used interchangeably.
How do I find the GCF quickly?
Use the Euclidean algorithm: divide the larger number by the smaller, then repeat with the divisor and the remainder until it divides evenly. The last divisor is the GCF.
Why is the GCF useful?
It simplifies fractions and ratios, factors polynomials, and helps solve word problems that split quantities into equal groups of maximum size.
What is the GCF of two numbers with no common factors?
It is 1. Such numbers are called coprime, for example 8 and 15.
What is the GCF of 0 and a positive number?
Every number divides 0, so the GCF of 0 and n is n. The calculator skips a third number set to 0.
Is the GCF of negative numbers defined?
Yes — the calculator uses absolute values, since the factor set of −48 is the same as that of 48.