About the Greatest Common Factor Calculator
The greatest common factor is the largest number that divides two or more integers evenly. Also called the greatest common divisor, it is what you use to reduce fractions to lowest terms, simplify ratios, and split quantities into the largest possible equal groups.
The formula
GCD(a, b) = GCD(b, a mod b), until b = 0This is the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller. When the remainder reaches zero, the other value is the GCD.
How to use this calculator
- 1Enter your Number A. The field starts at
48, which you can overwrite. - 2Enter your Number B. The field starts at
18, which you can overwrite. - 3Enter your Number C (0 to skip). The field starts at
0, which you can overwrite. - 4Read the result straight away — it recalculates as you type, so there is no button to press. Use Share to copy a link that reopens the page with your exact numbers filled in.
Worked example
| Input | Value |
|---|---|
| Number A | 48 |
| Number B | 18 |
| Number C (0 to skip) | 0 |
Result
GCF (GCD): 6
LCM of A & B: 144
A ÷ GCF = 8
B ÷ GCF = 3
Those are the values the page loads with, so you can reproduce this result yourself and then change one field at a time to see what drives the outcome.
Understanding your result
The Euclidean algorithm is remarkably efficient — it dates to Euclid around 300 BC and remains the standard method. For 48 and 18: 48 mod 18 is 12, then 18 mod 12 is 6, then 12 mod 6 is 0, so the GCD is 6. It converges in very few steps even for enormous numbers, which is why it is still used in modern cryptographic software.
The alternative approach through prime factorisation is more illuminating even if slower. Take the lowest power of each prime the numbers share: 48 is 2⁴ × 3 and 18 is 2 × 3², so the shared primes at their lowest powers give 2 × 3 = 6. This also shows why the GCD of two coprime numbers is 1 — they share no primes at all.
Things worth knowing
- GCF, GCD, and highest common factor all mean the same thing.
- Dividing a fraction's numerator and denominator by their GCD reduces it to lowest terms in one step.
- Numbers with a GCD of 1 are coprime. Consecutive integers are always coprime.
- GCD(a, b) × LCM(a, b) = a × b, which lets you find either from the other.
- The GCD of any number and zero is that number, since everything divides zero.
Frequently asked questions
What does the greatest common factor mean?+
The largest integer that divides all your numbers with no remainder. For 48 and 18 it is 6, because 6 divides both and nothing larger does.
How does the Euclidean algorithm work?+
Divide the larger number by the smaller and keep the remainder, then repeat with the smaller number and that remainder. When the remainder hits zero, the last non-zero value is the GCD.
How do I use the GCF to simplify a fraction?+
Divide both numerator and denominator by it. For 48/18 the GCF is 6, giving 8/3 immediately — the fully reduced form, with no further simplification possible.
What if two numbers have no common factors?+
Their GCD is 1 and they are called coprime or relatively prime. A fraction made from coprime numbers is already in lowest terms.