Gcd Two Numbers
Calculator

Inputs

Greatest common divisor
6

Results

Greatest common divisor
6

Results

Greatest common divisor6

formula-map diagram

Greatest common divisor
6

Formula map

Formula

gcd(a, b) via the Euclidean algorithm

= 6

Note

Simplified model: these are exact results of the stated idealised formulas, assuming perfect shapes and exact inputs. Real measurements carry error, and the ellipse perimeter is a Ramanujan approximation. Verify independently before relying on these figures.

Example: with the default inputs, calculator.mathematics.gcd_result is 6.

More in Mathematics

See all →

Frequently asked questions

What is the greatest common divisor (GCD)?+

The GCD of two numbers is the largest whole number that divides both without a remainder. For 48 and 18, it is 6.

How does this calculator find the GCD?+

It uses the Euclidean algorithm: repeatedly replace the larger number by the remainder of dividing it by the smaller one, until the remainder is 0. The last non-zero value is the GCD.

What if I enter decimals or negative numbers?+

Inputs are rounded to the nearest whole number and their absolute value is used. The fields accept 0 and above, so a GCD is always a non-negative integer.

What is the GCD when one number is 0?+

The GCD of a number and 0 is that number itself. If both numbers are 0, the calculator returns 0.

What is the GCD useful for?+

A common use is simplifying fractions: divide the numerator and denominator by their GCD to get the lowest terms. It also helps when splitting items into equal groups.