gcd(1071, 462)
= 21
The shared factor can be found without listing every divisor.
Find the exact GCD of two large integers. Simplify ratios and test common factors without rounding.
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.
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.
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.
= 21
The shared factor can be found without listing every divisor.
= 6
Negative inputs still produce a non-negative GCD.
Add large integers and exact decimals without floating-point rounding. See every digit of the sum and copy the result in words.
Subtract huge numbers exactly, including negative and decimal values. Find precise differences and inspect every digit.
Multiply very large integers and exact decimals. View the full integer product or exact fraction without floating-point conversion.
Divide large numbers with exact quotients, remainders, and reduced fractions. Inspect rounded decimals separately.
Calculate exact large powers with whole-number exponents, including decimal bases and scientific-notation inputs.
Compute exact factorials from 0 to 50,000. View full integer results, digit counts, and downloadable text.
Calculate the exact LCM of large whole numbers. Find common multiples and repeating cycle lengths.
Find the exact integer square root of a large non-negative whole number, rounded down without floating-point errors.
Calculate exact nCr combinations for large whole numbers. Count selections where order does not matter.
Compute exact nPr permutations. Count ordered selections from distinct items without replacement.
Calculate bitwise AND, OR, XOR, and shifts on large integers. Enter hexadecimal, binary, octal, or decimal values.
Add, subtract, multiply, and divide decimals using exact fractions. Avoid floating-point errors such as 0.1 + 0.2.
Calculate with scientific-notation input such as 3.5e19. Parse large and tiny decimal values exactly as written, without floating-point conversion.