Big Number Calculator

Greatest Common Divisor Calculator

Find the exact GCD of two large integers. Simplify ratios and test common factors without rounding.

4 digits
Operation
3 digits

How this calculation works

When at least one input is nonzero, the greatest common divisor is the largest positive integer dividing both values. Euclid’s algorithm repeatedly replaces a pair with the divisor and remainder until the remainder becomes zero. This tool defines GCD(0, 0) as zero.

Inputs and accuracy

Enter two whole numbers. Signs do not make the returned GCD negative. GCD(a, 0) equals the absolute value of a, and this calculator uses GCD(0, 0) = 0.

When to use it

Reduce fractions by dividing the numerator and denominator by their GCD, compare shared factors, or check whether two integers are coprime when their GCD is one.

Worked examples

gcd(1071, 462)

= 21

The shared factor can be found without listing every divisor.

gcd(-48, 18)

= 6

Negative inputs still produce a non-negative GCD.

Related calculators

Large Number Addition Calculator

Add large integers and exact decimals without floating-point rounding. See every digit of the sum and copy the result in words.

Large Number Subtraction Calculator

Subtract huge numbers exactly, including negative and decimal values. Find precise differences and inspect every digit.

Large Number Multiplication Calculator

Multiply very large integers and exact decimals. View the full integer product or exact fraction without floating-point conversion.

Large Number Division Calculator

Divide large numbers with exact quotients, remainders, and reduced fractions. Inspect rounded decimals separately.

Large Number Power Calculator

Calculate exact large powers with whole-number exponents, including decimal bases and scientific-notation inputs.

Large Factorial Calculator

Compute exact factorials from 0 to 50,000. View full integer results, digit counts, and downloadable text.

Least Common Multiple Calculator

Calculate the exact LCM of large whole numbers. Find common multiples and repeating cycle lengths.

Large Integer Square Root Calculator

Find the exact integer square root of a large non-negative whole number, rounded down without floating-point errors.

Large Number Combinations Calculator (nCr)

Calculate exact nCr combinations for large whole numbers. Count selections where order does not matter.

Large Number Permutations Calculator (nPr)

Compute exact nPr permutations. Count ordered selections from distinct items without replacement.

Big Integer Bitwise Calculator

Calculate bitwise AND, OR, XOR, and shifts on large integers. Enter hexadecimal, binary, octal, or decimal values.

Exact Decimal Calculator

Add, subtract, multiply, and divide decimals using exact fractions. Avoid floating-point errors such as 0.1 + 0.2.

Scientific Notation Calculator

Calculate with scientific-notation input such as 3.5e19. Parse large and tiny decimal values exactly as written, without floating-point conversion.