GCD Calculator
Calculate the greatest common divisor, also called GCF or HCF, for two or more positive integers with Euclidean algorithm steps and Bezout coefficients for pairs.
Greatest common divisor, GCF, or HCF
The English SERP uses GCD, GCF, and HCF almost interchangeably for integer arithmetic. A useful calculator should accept several numbers, show the final divisor first, then show the Euclidean algorithm steps.
The Euclidean algorithm keeps replacing a pair by the divisor and remainder until the remainder is 0.
- Enter at least two positive integers.
- Read the final GCD at the top.
- For two numbers, use the Bezout coefficient check when modular arithmetic or Diophantine equations matter.
When the GCD is 1
If the GCD is 1, the numbers are relatively prime. That does not mean the numbers themselves are prime; it only means they share no positive divisor greater than 1.
| Input | GCD |
|---|---|
| 48, 18 | 6 |
| 252, 105 | 21 |
| 35, 64 | 1 |
Frequently Asked Questions
Sources and References
- GCD Calculator that shows stepsMathPortal
- Greatest Common Divisor/Factor CalculatoreMathHelp
- Greatest Common DivisorWolfram MathWorld
- Euclidean AlgorithmWolfram MathWorld
Calculations are based on the listed reference sources. Links open in a new tab.
Related Tools
Find the least common multiple for two or more positive integers with pairwise GCD steps and prime factorization.
Find the greatest common divisor and least common multiple for two to six nonzero integers, with Euclidean algorithm steps and prime factorization.
Find all positive factors of a number, factor pairs, prime factorization, factor count, sum of factors, proper factors, and number type.
Break an integer into prime factors, see repeated factors, canonical exponent form, trial-division steps, and the total number of positive factors.
Check whether a whole number is prime, composite, 0, or 1. Shows the smallest factor for composite numbers and links to full factorization.