Contents
How the GCD calculator works
Enter two integers. The calculator finds their greatest common divisor and can reveal every division in the Euclidean algorithm.
Finding the largest shared factor
The GCD is the largest positive integer that divides both numbers without a remainder. Signs do not affect divisibility, so the calculation uses the absolute values of the inputs.
Each pass replaces the larger pair with the divisor and remainder. When the remainder reaches zero, the last nonzero divisor is the answer.
- Enter whole numbers in both fields.
- Read the prominent GCD and the two reduced quotients.
- Open the Euclidean algorithm when you want to audit the arithmetic.
Useful examples
48 and 18 give 6. They can be divided into six equal groups containing 8 and 3 items respectively.
84 and 126 give 42. The same result reduces the fraction 84/126 to 2/3.
17 and 31 give 1. A GCD of one means the numbers are coprime.
-54 and 24 give 6. The minus sign is ignored for the purpose of finding divisors.
Zero, large integers and interpretation
- The GCD of 0 and a nonzero integer is the absolute value of that integer.
- There is no greatest positive common divisor of 0 and 0; this calculator displays 0 as a practical computing convention.
- Composite numbers can still be coprime: 8 and 15 have GCD 1.
- Inputs may contain up to 100 digits, but decimal fractions and exponent notation are not accepted.
A GCD describes shared divisibility, not whether either input is prime.
Questions about greatest common divisors
What does a GCD of 1 mean?
The two integers are coprime: they share no positive divisor larger than one.
Can I enter negative integers?
Yes. The calculator uses absolute values, so changing a sign does not change the GCD.
Why is GCD(0, 25) equal to 25?
Every positive divisor of 25 also divides zero, so 25 is the greatest common divisor of the pair.
Is GCD(0, 0) really zero?
Mathematically the usual greatest positive divisor is not defined for this pair. The displayed zero is an explicit computing convention.
How does the GCD reduce a fraction?
Divide the numerator and denominator by their GCD. For 84/126, division by 42 gives 2/3.
Does the calculator round large values?
No. It uses exact integer arithmetic for inputs up to 100 digits.
Similar calculators
You may find the following calculators on the same topic useful:
- Z-score calculator. Compare a value with its group mean or recover the original value from a known Z-score.
- Least common multiple calculator. Enter two integers with up to 100 digits each to find their exact least common multiple.
- Digital root calculator. Enter a whole number with up to 10,000 digits to reduce it to one digit and inspect the calculation.
- Next prime number calculator. Enter a whole number up to 1,000,000,000,000 to find the first prime number that is strictly greater.
- Combinations calculator. Enter the total number of elements and the selection size to get the exact number of possible groups.
- Division with remainder calculator. Enter an integer dividend and a nonzero divisor to calculate the quotient and the unique Euclidean remainder.
- Degrees to radians converter. Enter an angle in degrees or radians and see the equivalent value immediately.
- Prime Number Checker. Enter a whole number to classify it as prime, composite, or an exceptional value.
- Superfactorial Calculator. Enter a whole number n to multiply all factorials from 1! through n!.
- Primorial Calculator. Enter a whole-number limit to multiply every prime not greater than n.
Share on social media
If you liked it, please share the calculator on your social media platforms. It`s easy for you and beneficial for the project`s promotion. Thank you!