GCF Calculator
The greatest common factor, also called GCD or HCF, is the biggest integer that divides every number in a set without remainder. Enter two or more positive integers and this calculator returns their greatest common factor right away, computed with the Euclidean algorithm. Use the result to check homework or to simplify a fraction like 84/144 down to 7/12.
How to compute the GCF
-
1
Enter integers
Two or more positive integers, separated by commas, spaces or new lines.
-
2
The tool applies the Euclidean algorithm
Repeatedly replaces (a, b) with (b, a mod b) until the remainder is zero.
-
3
Read the GCF
The result shown is the greatest common factor of your numbers, computed with the Euclidean algorithm.
Euclidean algorithm
To find gcd(a, b) where a ≥ b > 0:
while b ≠ 0:
(a, b) ← (b, a mod b)
return a
For more than two numbers, apply the identity gcd(a, b, c) = gcd(gcd(a, b), c).
Worked example: GCF(84, 144)
| Step | Division | Remainder |
|---|---|---|
| 1 | 144 ÷ 84 = 1 r 60 | 60 |
| 2 | 84 ÷ 60 = 1 r 24 | 24 |
| 3 | 60 ÷ 24 = 2 r 12 | 12 |
| 4 | 24 ÷ 12 = 2 r 0 | 0 |
The last non-zero remainder is 12, so gcd(84, 144) = 12, and 84/144 simplifies to 7/12.
When the GCF is 1
If gcd(a, b) = 1, the numbers are coprime (relatively prime). 15 and 28 are coprime even though neither is prime; that property is what makes 15/28 impossible to reduce further.
Relation to LCM
gcd(a, b) × lcm(a, b) = |a × b|. So once you have one, you have the other for free.
Common use cases
- Simplifying fractions to lowest terms.
- Finding the largest identical tile size that covers a rectangle.
- Reducing gear ratios and pulley diameters.
- Modular arithmetic, coprime pairs are invertible modulo each other.
Frequently Asked Questions
They are three names for the same quantity. GCF (greatest common factor) is common in US schools, GCD (greatest common divisor) in maths and CS, HCF (highest common factor) in UK curricula.
It skips them: only positive integers are included in the calculation. To include a negative number, enter its absolute value instead, for example 84 for -84.
It is n (for positive n). Zero is divisible by every integer, so the largest common divisor with n is n itself. gcd(0, 0) is usually defined as 0.
No, the numbers are not stored. They are sent to our server only to compute the result, and while you move through the funnel steps they may also appear in the page link.
Related Tools
Social Security Calculator
Estimate a US Social Security retirement benefit from your PIA and claiming age. Compare monthly and annual amounts at 62, FRA 67 and 70.
BMI Calculator
Calculate body mass index from height and weight. Shows WHO category, healthy-weight range and limitations of BMI.
Age Calculator
Calculate exact age in years, months and days from a birth date, plus total days, hours and the next birthday countdown.
Dog Age Calculator
Convert your dog's age to human years using modern veterinary research. Breed-size aware: small, medium and large dogs age differently.
Fahrenheit to Celsius Converter
Convert Fahrenheit temperatures to Celsius with the exact formula, Kelvin output and common reference points for weather, cooking and health.
Amp-Hour Calculator
Work out battery runtime and stored energy from amp-hours, voltage and load current. Get runtime in hours and minutes plus energy in watt-hours and kilowatt-hours.
Tool available in other languages
- Calculateur de PGCD [FR]
- حاسبة القاسم المشترك الأكبر [AR]
- ggT-Rechner [DE]
- GCF-kalkylator [SV]
- เครื่องคำนวณ GCF [TH]
- Calculadora de MCD [ES]
- 최대공약수 계산기 [KO]
- Kalkulator FPB [ID]
- 最大公約数計算ツール [JA]
- GCF-calculator [NL]
- Công cụ tính ƯCLN [VI]
- Kalkulator NWD [PL]
- Calculadora de MDC [PT]
- Calcolatore GCF [IT]
- Калькулятор НОД [RU]
- EBOB Hesaplama Aracı [TR]
- 最大公约数计算器 [ZH]