MATH

Greatest common divisor calculator

Find the largest integer divisor shared by two numbers.

01 / INPUTS

Your numbers

02 / YOUR RESULT
6
Greatest common divisor

Default inputs are examples. Change them to match your situation.

How to use this calculator

Find the largest integer divisor shared by two numbers. Enter first whole number, second whole number. The result updates when you change an input. To compare two sets of inputs, save scenario A, then enter the second set; the result panel shows the difference.

Formula and limits

The Euclidean algorithm repeatedly replaces (a,b) with (b,a mod b). GCD(0,0) is not defined here.

Worked example

Starting-value example (not a recommended target):

InputExample value
First whole number48
Second whole number18

Greatest common divisor: 6

Interpreting your result

Use consistent units when a calculator asks for lengths or areas. Negative inputs are accepted only where the operation supports them. Display rounding does not change the underlying formula.

From a common divisor to a common multiple

For two positive whole numbers, divide the first number by their GCD, then multiply by the second to find their LCM. With 48 and 18, the GCD is 6, so the LCM is (48 ÷ 6) × 18 = 144. Use the least common multiple calculator with steps when you need a shared denominator or the next time two schedules coincide when they start together and their repeat intervals use the same time unit.

How scenario comparisons and rounding work

Background reading

OpenStax Algebra and Trigonometry. This is a subject reference, not an endorsement or independent review of Calcaven.

Implementation updated September 25, 2026 · How we check calculations