Greatest Common Factor calculator
Find the largest positive integer that divides each input.
Greatest common factor
Example result12
Showing the previous result. Check the highlighted inputs.
Result details
3 input integers.
- Greatest common factor
- 12
Estimates only.
Your inputs
How it’s worked out
See how we got 12
Use the Euclidean algorithm gcd(a,b) = gcd(b, a mod b). Common factors are precisely the factors of the greatest common divisor.
- Run the Euclidean algorithm across the input numbers.
- The last nonzero remainder gives the common divisor.
About this calculator
Signs do not affect the GCF or LCM of the input magnitudes.
Worked example
Greatest common factor · 12
Use the Euclidean algorithm gcd(a,b) = gcd(b, a mod b). Common factors are precisely the factors of the greatest common divisor.
- Run the Euclidean algorithm across the input numbers.
- The last nonzero remainder gives the common divisor.