GCF Calculator
Find the largest common divisor of a list of signed integers, for simplifying fractions or dividing quantities into equal groups. Negative inputs use their magnitudes.
Separate numbers with commas or spaces. You can calculate more than two numbers at once.
The calculator repeatedly applies the Euclidean algorithm until all entered integers have been reduced to their greatest shared factor.
Greatest common factor
- GCF = the largest number that divides every input evenly.
- Euclid's method: replace the larger number by the remainder until it reaches 0. GCF(24, 36): 36 mod 24 = 12, 24 mod 12 = 0 → 12.
- Divide a fraction's top and bottom by their GCF to simplify it: 24/36 = 2/3.
- A GCF of 1 means the numbers share no positive factor greater than 1 (they are coprime).
How to use the GCF Calculator
- Enter signed integers separated by commas or spaces.
- The parser accepts signed decimal integers, including zero and values larger than the JavaScript safe-number range, using exact integer arithmetic. Invalid entries reject the entire list.
- Negative inputs use their absolute magnitudes. A single integer returns its absolute value; GCF(0,n) = |n| and the all-zero result is reported as zero by convention.
- The first pair is processed with the Euclidean algorithm.
- The larger remainder sequence continues until the remainder becomes zero.
- The final non-zero value is the GCF for that pair.
- That result is combined with the next number.
- The process repeats until every number has been included.
Signed integers and zero convention
The Euclidean algorithm operates on exact integers. GCF(0,n) = absolute n; the all-zero list returns zero by convention. That zero is not a usable divisor for simplifying a fraction.
Examples
GCF of 12 and 18
The common positive factors include 1, 2, 3 and 6, so the greatest common factor is 6.
GCF of 24, 36 and 60
The largest integer dividing all three values without remainder is 12.
Simplifying fractions
For 18/24, GCF(18,24) = 6, so dividing both terms by 6 gives 3/4.
Relatively prime numbers
If two integers share no factor larger than 1, their GCF is 1.
Check the result in context
Signed and zero inputs: GCF(−24,36,0) = 12. GCF(0,18) = 18, while the all-zero result is 0 by the tool’s convention.
GCF and LCM of common pairs
| Numbers | GCF | LCM | Fraction simplified |
|---|---|---|---|
| 4 and 6 | 2 | 12 | 2/3 |
| 6 and 8 | 2 | 24 | 3/4 |
| 8 and 12 | 4 | 24 | 2/3 |
| 9 and 12 | 3 | 36 | 3/4 |
| 10 and 15 | 5 | 30 | 2/3 |
| 12 and 18 | 6 | 36 | 2/3 |
| 14 and 21 | 7 | 42 | 2/3 |
| 15 and 20 | 5 | 60 | 3/4 |
| 18 and 24 | 6 | 72 | 3/4 |
| 24 and 36 | 12 | 72 | 2/3 |
| 36 and 48 | 12 | 144 | 3/4 |
Frequently asked questions
What is the difference between GCF and GCD?
They refer to the same idea: greatest common factor and greatest common divisor are two names for the largest integer dividing all values.
Can I enter more than two numbers?
Yes. The current calculator supports multiple signed integers separated by commas or spaces.
What algorithm is used?
The calculator uses the Euclidean algorithm pair by pair across the entered number list.
How is GCF used to simplify fractions?
Divide the numerator and denominator by their GCF to reduce the fraction to lowest terms.
What does a GCF of 1 mean?
It means the numbers have no common positive factor greater than 1.
How does GCF help with equal-size packs?
For 24 red and 36 blue items, 12 identical packs are possible without leftovers: each contains 2 red and 3 blue. GCF is the maximum pack count, not items per pack.
More math tools
LCM Calculator
Find the least common multiple of two or more positive integers.
Open tool →Fraction Calculator
Calculate and simplify fractions and mixed numbers with steps.
Open tool →Factor Calculator
Find factors, factor pairs and prime factorization for a whole number.
Open tool →Prime Number Checker
Check whether a whole number is prime or composite and list its positive factors.
Open tool →Slope Calculator
Calculate slope from two points plus line equation, angle, grade and point distance.
Open tool →Percentage Change Calculator
Calculate percentage increase or decrease from an original value to a new value.
Open tool →