Procedure
HCF by Euclid's algorithm
Arithmetic • Number System • LCM and HCF
Statement
For positive integers and , write with . Every common divisor of and divides and every common divisor of and divides , so . Replacing by and repeating must stop, because the remainders strictly decrease; the last non-zero remainder is .
How to use it
- 1Divide the larger by the smaller, then divide the old divisor by the remainder, and keep going until the remainder is .
- 2Read off the last non-zero remainder: that is the HCF.
- 3Use it in preference to prime factorisation when the numbers are large or awkward to factorise, since it needs only short division.
- 4For three or more numbers, apply it to two, then to that HCF and the next number.
Worked example
Find the HCF of and .
Step-by-step
- 1
Why: Divide the larger by the smaller and keep the remainder .
- 2
Why: The old divisor is now divided by the remainder .
- 3
Why: The remainder is , so the process stops here.
- 4
Why: The last non-zero remainder is the HCF.
Answer
Watch out
The answer is the last NON-ZERO remainder, not the final zero and not the last quotient. It applies to integers only, and to two at a time — running it on three numbers at once is not defined. It gives the HCF, never the LCM; obtain the LCM from it through .
Builds on
Also known as
Euclidean algorithm, Euclid's division algorithm, HCF by repeated division, gcd by division, successive division method for HCF, last non-zero remainder