This GCF calculator finds the greatest common factor of two positive integers, with an optional third. The default uses 48 and 18 with C left at 0, so the result is 6.
Fraction simplification and factoring problems rely on GCF constantly. For listing every factor of one number, use the factor calculator.
How the formula works
The engine takes gcd(A, B). If optional C is greater than zero, it takes gcd of that result with C. Euclidean style reduction makes large inputs fast.
Worked example
48 and 18. 48 = 18×2 + 12. 18 = 12×1 + 6. 12 = 6×2 + 0. GCF = 6.
| Input | Value |
|---|---|
| Number A | 48 |
| Number B | 18 |
| Number C (optional) | 0 |
| GCF | 6 |
How to use the fields
- Number A and Number B are required positive integers.
- Number C is optional; leave 0 to ignore it.
Simplifying fractions
For 48/18, divide top and bottom by 6 to get 8/3. Finding GCF first keeps reduction mechanical and less error prone than guessing.
Common mistakes
- Listing a common factor that is not the greatest
- Confusing GCF with LCM
- Entering 0 for A or B
- Forgetting that optional C=0 means “ignore C”
Three number example pattern
If you set C to a positive integer, the result must divide all three values. Check by dividing each input by the reported GCF and confirming whole number quotients.
Classroom practice
Prime factor 48 as 2^4×3 and 18 as 2×3^2. Shared primes give 2×3 = 6. Matching the calculator connects factor trees to GCF.
Then ask for GCF(48, 18, 30) as an extension while remembering the published default leaves C at 0.
Word problems
GCF appears when you split items into the largest equal groups with none left over. The group size is the GCF of the counts.
Write the grouping story, compute GCF, then verify leftovers are zero.
Euclidean steps on paper
Divide the larger by the smaller, replace the larger with the smaller and the smaller with the remainder, and repeat until remainder 0. The last non-zero remainder is the GCF. Matching the calculator builds confidence in the algorithm.
For 48 and 18, the remainders 12 then 6 lead to GCF 6, same as the default.
Fraction and ratio cleanup
Any time a ratio of integers appears, dividing both parts by their GCF yields lowest terms. That habit shows up in recipes, map scales, and algebra reductions.
Compute GCF once, divide once, and avoid piecemeal dividing by 2 repeatedly unless that is the teaching goal.
Group size stories
If you have 48 red beads and 18 blue beads and want identical mixed kits with none left over, kit count equals the GCF. Each kit gets 48÷6 red and 18÷6 blue.
Write the story, compute GCF, then state the per kit counts so the answer is usable.
LCM companion check
For two positive integers, LCM equals the product divided by the GCF. After you find GCF(48, 18) = 6, LCM is (48×18)÷6 = 144. That identity is a fast way to catch an inverted GCF/LCM mix up.
Use a dedicated LCM tool when you want that result directly, and keep this page focused on the greatest shared factor.
Prime factor cross check
Write prime factors, take the minimum power of each shared prime, and multiply. For 48 and 18 that minimum set is 2^1 × 3^1 = 6. Matching the calculator proves both methods.
When optional C is used, include C in the shared prime picture as well.
If A and B share no primes other than the empty set, the GCF is 1 and the numbers are coprime. That outcome is valid and useful when a fraction is already in lowest terms.
Leave C at 0 whenever you only care about the default two number path so screenshots stay aligned with published examples.
Limitations
Positive integers only for A and B. No polynomial GCF, no fraction inputs, and no automatic fraction simplification UI beyond the numeric GCF itself.