GCF Calculator
- Updated
- Formula shown
- Free, no sign-up
Results
The GCF of 48, 18 and 30 is 6
Method 1: Euclid's algorithm (divide, then divide the divisor by the remainder until the remainder is 0) 1. GCF(48, 18): 48 = 2 × 18 + 12 18 = 1 × 12 + 6 12 = 2 × 6 + 0 The remainder is 0, so GCF(48, 18) = 6, the last divisor. 2. GCF(6, 30): 30 = 5 × 6 + 0 The remainder is 0, so GCF(6, 30) = 6, the last divisor. So the GCF of all 3 numbers is 6. Method 2: prime factorization (multiply the primes every number shares, each to its lowest power) 48 = 2⁴ × 3 18 = 2 × 3² 30 = 2 × 3 × 5 Shared primes at their lowest powers: 2, 3 GCF = 2 × 3 = 6 Method 3: list the factors of each number Factors of 48: 1, 2, 3, 4, 6, 8, 12, 16, 24, 48 Factors of 18: 1, 2, 3, 6, 9, 18 Factors of 30: 1, 2, 3, 5, 6, 10, 15, 30 Common factors: 1, 2, 3, 6 The greatest common factor is 6.
How to use the GCF calculator
- Enter two or more whole numbers separated by commas or spaces, such as
48, 18, 30. - Read the GCF and whether the numbers are relatively prime. For two numbers you also see their fraction in lowest terms.
- Open the step-by-step working for Euclid's algorithm, the prime factorization method and, for smaller numbers, the factor lists.
The calculator accepts up to 20 numbers with up to 30 digits each and works with exact whole-number arithmetic, so even very large inputs give an exact GCF.
GCF formulas
Lists: GCF(a, b, c) = GCF(GCF(a, b), c)
Prime factors: GCF = product of the shared primes, each to its lowest power
The greatest common factor of a list is the largest whole number that divides every number in it with no remainder. In Euclid's rule, a and b are two whole numbers and a mod b is the remainder when a is divided by b. Any number that divides both a and b also divides that remainder, so replacing the pair (a, b) by (b, remainder) keeps the same common factors while the numbers shrink quickly. When the remainder reaches 0, the last divisor is the GCF.
Worked example: the GCF of 48, 18 and 30
Euclid's algorithm. Start with the first pair, 48 and 18:
- 48 = 2 × 18 + 12
- 18 = 1 × 12 + 6
- 12 = 2 × 6 + 0
The remainder is 0, so GCF(48, 18) = 6. Then GCF(6, 30): 30 = 5 × 6 + 0, so the GCF of all three numbers is 6.
Prime factorization.
- 48 = 2⁴ × 3
- 18 = 2 × 3²
- 30 = 2 × 3 × 5
The primes in every number are 2 and 3, and the lowest power of each is the first power, so the GCF is 2 × 3 = 6. The 5 in 30 and the extra 2s and 3s are not shared by all three numbers, so they are left out.
Factor lists.
- Factors of 48: 1, 2, 3, 4, 6, 8, 12, 16, 24, 48
- Factors of 18: 1, 2, 3, 6, 9, 18
- Factors of 30: 1, 2, 3, 5, 6, 10, 15, 30
The factors in all three lists are 1, 2, 3 and 6, and the greatest is 6.
GCF table for common numbers
Find the row for one number and the column for the other. A 1 means the two numbers are relatively prime.
| GCF | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | 12 | 15 | 16 | 18 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2 | 2 | 1 | 2 | 1 | 2 | 2 | 1 | 2 | 2 | 1 | 2 | 2 |
| 3 | 1 | 3 | 1 | 1 | 3 | 1 | 3 | 1 | 3 | 3 | 1 | 3 |
| 4 | 2 | 1 | 4 | 1 | 2 | 4 | 1 | 2 | 4 | 1 | 4 | 2 |
| 5 | 1 | 1 | 1 | 5 | 1 | 1 | 1 | 5 | 1 | 5 | 1 | 1 |
| 6 | 2 | 3 | 2 | 1 | 6 | 2 | 3 | 2 | 6 | 3 | 2 | 6 |
| 8 | 2 | 1 | 4 | 1 | 2 | 8 | 1 | 2 | 4 | 1 | 8 | 2 |
| 9 | 1 | 3 | 1 | 1 | 3 | 1 | 9 | 1 | 3 | 3 | 1 | 9 |
| 10 | 2 | 1 | 2 | 5 | 2 | 2 | 1 | 10 | 2 | 5 | 2 | 2 |
| 12 | 2 | 3 | 4 | 1 | 6 | 4 | 3 | 2 | 12 | 3 | 4 | 6 |
| 15 | 1 | 3 | 1 | 5 | 3 | 1 | 3 | 5 | 3 | 15 | 1 | 3 |
| 16 | 2 | 1 | 4 | 1 | 2 | 8 | 1 | 2 | 4 | 1 | 16 | 2 |
| 18 | 2 | 3 | 2 | 1 | 6 | 2 | 9 | 2 | 6 | 3 | 2 | 18 |
Simplifying fractions with the GCF
| Fraction | GCF | Lowest terms |
|---|---|---|
| 18/24 | 6 | 3/4 |
| 45/60 | 15 | 3/4 |
| 28/42 | 14 | 2/3 |
| 36/84 | 12 | 3/7 |
| 56/98 | 14 | 4/7 |
| 120/450 | 30 | 4/15 |
Tips and common mistakes
- The GCF can't be bigger than the smallest number, and it always divides it. If your answer doesn't divide every number exactly, recheck it.
- Don't confuse GCF with LCM. The GCF is a factor (no bigger than the numbers); the LCM is a multiple (no smaller than them). Find the other one with the LCM calculator.
- Use Euclid for big numbers. Listing factors of a 10-digit number is impractical; Euclid's algorithm needs only a few divisions.
- To list every factor the numbers share, not just the greatest, use the common factor calculator. To reduce a fraction and keep calculating with it, try the fraction calculator.
Frequently asked questions
What is the GCF of 48 and 18?
The GCF of 48 and 18 is 6. By Euclid's algorithm: 48 = 2 × 18 + 12, then 18 = 1 × 12 + 6, then 12 = 2 × 6 + 0, so the last divisor, 6, is the GCF. In prime factors, 48 = 2⁴ × 3 and 18 = 2 × 3² share 2 × 3 = 6.
Are GCF, GCD and HCF the same thing?
Yes. Greatest common factor (GCF), greatest common divisor (GCD) and highest common factor (HCF) are three names for the largest whole number that divides every number in the list with no remainder. US schools tend to say GCF, the UK says HCF, and GCD is common in higher maths.
How does Euclid's algorithm work?
Divide the larger number by the smaller, then divide the smaller number by the remainder, and repeat until the remainder is 0. The last divisor is the GCF. For 1071 and 462: 1071 = 2 × 462 + 147, 462 = 3 × 147 + 21, 147 = 7 × 21 + 0, so the GCF is 21.
What does it mean when the GCF is 1?
The numbers are relatively prime (coprime): no whole number other than 1 divides all of them. 8 and 15 are coprime even though neither is prime, so the fraction 8/15 is already in lowest terms.
How do I simplify a fraction with the GCF?
Divide the numerator and the denominator by their GCF. For 18/24 the GCF is 6, so 18/24 = 3/4. Dividing by the greatest common factor reduces the fraction to lowest terms in a single step.