A familiar situation
Find the largest shared divisor when reducing a fraction or grouping items evenly.
How to use this calculator
- Enter first integer, second integer.
- Select Calculate to see the answer and its breakdown.
- Keep a scenario, change an input and compare the results.
Use consistent units and check the assumptions below before applying the result.
How greatest common factor is calculated
Euclid’s algorithm repeatedly replaces (a,b) with (b,a mod b) until the remainder is zero; the last nonzero value is the greatest common factor. For 84 and 30, gcd(84,30)=6, so both numbers are divisible by 6 and no larger common divisor exists.
gcd(a,b) is found by Euclid’s repeated remainder algorithm.For 84 and 30, gcd(84,30)=6, so both numbers are divisible by 6 and no larger common divisor exists.
Assumptions & useful context
The result depends on the values you enter and the method described above. Displayed numbers may be rounded; calculations use the unrounded values. Check that this model matches your situation before relying on it.
Frequently asked questions
Can one input be zero?
Yes, gcd(a,0)=|a| when a is nonzero.
Why reject two zeroes?
Every positive integer divides zero, so there is no greatest finite common factor.