Skip to content

Euclidean Algorithm Calculator

Result

Calculated result 6 Based on the values entered.
↗ Math

Euclidean Algorithm Calculator (GCD) The Euclidean Algorithm Calculator finds the greatest common divisor (GCD) of two integers using repeated division, and also gives the least common multiple (LCM). Enter two whole numbers. — free online calculator.

Formula

gcd(a, b) = gcd(b, a mod b), repeated until the remainder is 0
  • Euclidean Algorithm Calculator calculates its result from a, b. It uses the formula gcd(a, b) = gcd(b, a mod b), repeated until the remainder is 0. 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: Euclidean Algorithm

Inputs
  • a: 48
  • b: 18

Using a = 48, b = 18, the calculated result is 6.

Sample result: Calculating…

Frequently asked questions

What does the Euclidean Algorithm calculate?

Euclidean Algorithm Calculator (GCD) The Euclidean Algorithm Calculator finds the greatest common divisor (GCD) of two integers using repeated division, and also gives the least common multiple (LCM). Enter two whole numbers. — 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: gcd(a, b) = gcd(b, a mod b), repeated until the remainder is 0.

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.

Page information

Updated: October 7, 2026