HCF / greatest common divisor
Solve hcf / greatest common divisor with your values and follow each calculation step.
Inputs
Use the units shown—
Enter your values and select Calculate.
Formula & explanation
gcd(a,b) = gcd(b, a mod b)
Variables & units
- First positive integer
- Numeric value · minimum 1, maximum 1000000
- Second positive integer
- Numeric value · minimum 1, maximum 1000000
Worked example
The HCF of 375 and 825 is 75.
Assumptions
Inputs must be positive whole numbers. Every displayed division is computed from your inputs.
Formula version 1.0.0. JavaScript floating-point arithmetic applies. Results display up to 6 decimal places; stored values retain available precision. Use the units shown.
Practice with an example
Use the default input values to find the answer. The reset icon restores those values.
Calculated on your device. Your latest 100 calculations stay in this browser.