Use the GCF Calculator above to get the greatest common factor of two or more integers in a heartbeat. Enter your numbers. See the GCF instantly. Paste a list if that’s quicker. Negative values work. Decimals don’t.
At a glance
- Purpose: compute the Greatest Common Factor (also called GCD or HCF)
- Inputs: integers only, separated by spaces, commas, semicolons, or new lines
- Output: the single largest integer that divides all inputs with no remainder
- Extras: step-by-step methods, copy result, share link, quick reset
How to use the GCF Calculator
- Type your integers into the fields. Use commas or spaces to paste a whole list.
- Add more numbers by filling the last box. Clear a box to remove it.
- Read the result in the “Result” card. The GCF updates as you type.
- Optional: open Step by step to see factors or prime factorizations.
- Copy or share the result if you want to keep it or send it.
Input tips
- 128, 96, 32 → GCF = 32
- 100 80 60 40 → GCF = 20
- −24, 36 → GCF = 12 (uses absolute values)
- 0, 24 → GCF = 24
- 0, 0 → GCF = 0 by the usual convention
What is GCF
The Greatest Common Factor is the largest integer that evenly divides a set of integers. You may also see GCD (Greatest Common Divisor) or HCF (Highest Common Factor). All three terms refer to the same concept.
- For 18 and 24, the GCF is 6.
- For 128, 96, 32, the GCF is 32.
- For numbers like 7 and 13 that share no prime factors, the GCF is 1.
Why it matters
- Reduce fractions: divide numerator and denominator by the GCF.
- Group items: arrange objects into the largest equal groups without leftovers.
- Number theory building block: supports modular arithmetic and Diophantine equations.
- GCF ↔ LCM relation for two numbers:
GCF(a, b) × LCM(a, b) = |a × b|.
Methods to find the GCF
There are three classic approaches. Each one fits a slightly different situation.
1) Euclidean algorithm (fastest in practice)
Compute repeatedly:
GCF(a, b) = GCF(b, a mod b)
GCF(a, 0) = |a|
This is the gold-standard method for speed and simplicity. It works for large inputs and it scales to many numbers by folding:
GCF(a, b, c, …) = GCF( … GCF(GCF(a, b), c) … )
Example
Find GCF(270, 192).
- 270 mod 192 = 78 → GCF(270, 192) = GCF(192, 78)
- 192 mod 78 = 36 → GCF(192, 78) = GCF(78, 36)
- 78 mod 36 = 6 → GCF(78, 36) = GCF(36, 6)
- 36 mod 6 = 0 → GCF(36, 6) = 6
So the GCF is 6.
ASCII flow (visual cue)
270 ──mod 192→ 78
192 ──mod 78 → 36
78 ──mod 36 → 6
36 ──mod 6 → 0 ⇒ GCF = 6
2) Prime factorization (transparent, great for teaching)
Break each number into primes, then take the overlap with the smallest exponents. Multiply those primes.
Example
Find GCF(360, 840).
- 360 = 2³ × 3² × 5
- 840 = 2³ × 3 × 5 × 7
- Common primes with lowest exponents: 2³ × 3 × 5
- GCF = 8 × 3 × 5 = 120
3) List all factors (simple for tiny numbers)
List each number’s factors. Pick the largest common one. This works for small inputs. It grows tedious for large inputs.
Example
- Factors of 18: 1, 2, 3, 6, 9, 18
- Factors of 24: 1, 2, 3, 4, 6, 8, 12, 24
- Common factors: 1, 2, 3, 6
- GCF = 6
Method comparison table
| Method | Best for | Pros | Cons |
|---|---|---|---|
| Euclidean algorithm | Any size | Very fast. Minimal work. Easy to fold over many numbers. | Less “visible” than factor lists. |
| Prime factorization | Small or medium numbers | Clear steps. Shows the common structure. | Slower for very large inputs. Requires factoring. |
| List all factors | Tiny numbers | Conceptually simple. Quick by hand for small values. | Impractical once numbers grow. |
Worked examples you can check right now
Example A — two numbers
Input: 462 and 1071
Method: Euclidean
- 1071 mod 462 = 147 → GCF(1071, 462) = GCF(462, 147)
- 462 mod 147 = 21 → GCF(462, 147) = GCF(147, 21)
- 147 mod 21 = 0 → GCF = 21
Result: 21
Example B — three numbers
Input: 48, 180, 72
Method: fold the Euclidean algorithm
- GCF(48, 180) = 12
- GCF(12, 72) = 12
Result: 12
Example C — powers of two
Input: 1024, 2048, 4096
Prime view: 1024 = 2¹⁰, 2048 = 2¹¹, 4096 = 2¹²
Smallest shared exponent is 10 → GCF = 2¹⁰ = 1024
Example D — with zero or negatives
- 0 and 24 → GCF = 24
- 0 and 0 → GCF = 0 by common convention
- −8 and 12 → GCF uses |−8| and 12 → GCF = 4
Smart ways to use GCF in everyday math
1) Reduce fractions without guesswork
Take 84⁄140. Compute GCF(84, 140) = 28. Divide top and bottom by 28 → 3⁄5. Clean and final.
2) Plan equal groups
You have 60 red beads and 36 blue beads. You want identical bracelets with no leftovers. GCF(60, 36) = 12 → make 12 bracelets. Each bracelet uses 5 red and 3 blue.
3) Sync repeating events
Two events repeat every 18 days and every 24 days. GCF tells you the largest interval that fits both schedules if you want to cut a cycle into equal segments.
4) Solve linear Diophantine equations
The equation ax + by = c has integer solutions if and only if GCF(a, b) divides c. See the proof and extensions in number theory.
GCF, GCD, and HCF: different names, same result
You’ll see GCF, GCD, and HCF in textbooks and tutorials. Mathematicians favor GCD since it matches divisor-based notation. Many school curricula use HCF. Everyday explanations often prefer GCF. The calculator returns the same number regardless of the label.
Edge cases handled correctly
- Zeros present: GCF(n, 0) = |n|. GCF(0, 0) = 0 by common convention.
- Negative inputs: signs don’t matter. The algorithm uses absolute values.
- Repeated numbers: GCF(12, 12, 12) = 12.
- Co-prime sets: if no prime factors overlap the GCF is 1.
- Large inputs: Euclidean steps remain fast even for big integers.
Quick reference table
Use this table to cross-check results you might see while learning or teaching.
| Numbers | GCF |
|---|---|
| 18, 24 | 6 |
| 36, 60, 90 | 6 |
| 45, 75, 125 | 5 |
| 84, 140 | 28 |
| 128, 96, 32 | 32 |
| 270, 192 | 6 |
| 270, 192, 108 | 6 |
| 462, 1071 | 21 |
| 65536, 16384 | 16384 |
| 999, 27 | 27 |
| 360, 840 | 120 |
| 252, 198 | 18 |
| 100, 80, 60, 40 | 20 |
| 25, 699, 48 | 1 |
| 101, 103 | 1 |
| 12, 12, 12 | 12 |
| 123456, 789012 | 12 |
Step-by-step walkthroughs
By factor lists
Find GCF(30, 45, 60)
- Factors of 30 → 1, 2, 3, 5, 6, 10, 15, 30
- Factors of 45 → 1, 3, 5, 9, 15, 45
- Factors of 60 → 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60
- Common factors → 1, 3, 5, 15
- GCF → 15
By prime factorization
Find GCF(252, 198)
- 252 = 2² × 3² × 7
- 198 = 2 × 3² × 11
- Overlap with smallest exponents → 2 × 3²
- GCF → 2 × 9 = 18
By Euclidean algorithm
Find GCF(128, 96, 32)
- GCF(128, 96) →
128 mod 96 = 32 → GCF(96, 32)
96 mod 32 = 0 → GCF = 32 - GCF(32, 32) = 32
GCF and LCM together
For two numbers a and b:
GCF(a, b) × LCM(a, b) = |a × b|
This relation speeds up many problems. Find the GCF quickly. Flip to the LCM with a single multiplication and division. For three or more numbers the relation needs care. Do not assume the simple two-number identity holds unchanged for larger sets.
Troubleshooting input issues
- Decimals show an error: enter integers only. If a value is 12.5, scale the entire set to remove decimals or use a fraction approach first.
- Too many boxes: clear trailing empties to collapse the list. The calculator keeps one extra blank box for convenience.
- Big numbers look slow: Euclid remains fast. If you see a delay check your browser tab or extensions.
- I pasted a list and nothing happened: confirm separators. Commas, spaces, semicolons, and new lines work. Tabs also work in most browsers.
Practical mini-guide for teachers and learners
Hook attention with quick wins
Start with small pairs like 12 and 18. Show factor lists. Flip to larger pairs like 270 and 192. Demonstrate Euclid’s speed. Emphasize that both paths land on the same result.
Use visuals
Sketch a small factor tree for 360 and 840. Circle common primes. Multiply them to show 120. Then confirm the answer with the calculator to close the loop.
Connect to fractions
Take messy fractions from worksheets. Pick one with three-digit numbers. Use the GCF to knock it down in one step. Learners see immediate payoff.
Promote number sense
Ask for rough guesses before calculating. For 84 and 140, students often spot 28 since both end in multiples of 7 and 4. Quick estimates build confidence.
Frequently asked questions
What’s the difference between GCF, GCD, and HCF
None. These names describe the same result. The calculator returns that number regardless of the term used.
Can the GCF be zero
Yes in one edge case. GCF(0, 0) is defined as 0 by the usual convention. For GCF(n, 0) the result is |n|.
What if the numbers share no factors
The GCF is 1. Those numbers are co-prime or relatively prime.
Does order matter
No. GCF(18, 24) equals GCF(24, 18). Fold order does not change the result.
Can I use negative numbers
Yes. The GCF uses absolute values. The sign does not affect the result.
Does the calculator accept decimals
No. Enter integers only. Convert decimals to integers by scaling if needed.
How many numbers are allowed
Many. Add numbers until the last blank field remains. Paste a whole list if that’s faster.
Best practices for fast, mistake-free work
- Scan for common small primes first like 2, 3, 5. You often see an answer quickly.
- Use Euclid when values grow since it needs only division remainders.
- Keep sets clean by removing zeros that do not matter once a nonzero value exists.
- Reduce fractions immediately after you compute the GCF. This locks in the gain.
Short glossary
- Factor: a whole number that divides another with no remainder.
- Prime factorization: expression of a number as a product of prime powers.
- Co-prime: numbers with GCF equal to 1.
- Euclidean algorithm: repeated remainder steps that produce the GCF.
- LCM: the smallest positive integer divisible by each number in the set.
Sources and further reading
- Friendly practice videos: Khan Academy — Greatest common factor
Bring your numbers. Paste your list. Press nothing. The GCF appears as you type. Use it to cut fractions down to size. Group items with confidence. Teach with clarity. The calculator keeps the heavy lifting off your mind so you can focus on the problem that matters.