Greatest Common Divisor
Result
Calculated result
6
Based on the values entered.
↗ Math
Greatest Common Divisor — free online calculator.
Formula
Euclidean Algorithm: GCD(a,b) where while(b≠0) {temp=b; b=a%b; a=temp}
- Greatest Common Divisor calculates its result from a, b. It uses the formula Euclidean Algorithm: GCD(a,b) where while(b≠0) {temp=b; b=a%b; a=temp}. Change any input to recalculate the result instantly.
- The main inputs are a, b. Enter them in the units and format shown in the calculator.
- Keep comparable quantities in compatible units whenever the formula combines or compares them.
- Changing any input above recalculates the result with the same calculation engine used by this page.
Example: Greatest Common Divisor
Inputs
- a: 48
- b: 18
Using a = 48, b = 18, the calculated result is 6.
Sample result: Calculating…
Frequently asked questions
What does the Greatest Common Divisor calculate?
Greatest Common Divisor — free online calculator.
Which values should I enter?
Enter a, b using the units and format shown beside each field.
What formula does this calculator use?
The calculator uses the following relationship: Euclidean Algorithm: GCD(a,b) where while(b≠0) {temp=b; b=a%b; a=temp}.
Why might my result differ from another source?
Results can differ when another source uses different units, rounding rules, conventions or assumptions. Compare the inputs and definitions before comparing results.
Does the result update automatically?
Yes. Changing an input updates the result using the same calculation engine shown on this page.