Home · Everyday · Arithmetic · GCD Calculator
GCD Calculator
Find the largest whole number that divides two integers evenly, with their least common multiple shown as a cross-check.
What this calculator does
Find the largest whole number that divides two integers evenly, with their least common multiple shown as a cross-check. Where a measure is involved, US and metric units are both accepted — flip the unit toggle and the figures convert with the same definitions the formula uses. Every result on this page is computed from the formula stated below, with no hidden rounding steps.
The formula and method
The greatest common divisor is the largest positive integer that divides both numbers with nothing left over. For 48 and 36 the shared divisors are 1, 2, 3, 4, 6, and 12, so the GCD is 12. It can be found by listing divisors, by prime factorisation, or fastest by the Euclidean algorithm, which repeatedly replaces the larger number with the remainder of the division.
The GCD and LCM are linked by the identity gcd(a, b) × lcm(a, b) = |a × b|, which the outputs let you verify: 12 × 144 = 1728 = 48 × 36. Both inputs should be whole numbers; signs are ignored, since divisibility depends only on absolute value, and the GCD is what you divide numerator and denominator by to reduce a fraction to lowest terms.
Worked example
With the example inputs this page opens with (first integer (a) 48, second integer (b) 36), the result is 12 — greatest common divisor. Computed from the inputs on this page with the formula below — change any figure and every result updates.
Quick reference
| First integer (a) | Greatest common divisor | Least common multiple | Product a × b (check) |
|---|---|---|---|
| 12 | 12 | 36 | 432 |
| 24 | 12 | 72 | 864 |
| 36 | 36 | 36 | 1296 |
| 48 | 12 | 144 | 1728 |
| 60 | 12 | 180 | 2160 |
| 84 | 12 | 252 | 3024 |
| 96 | 12 | 288 | 3456 |
Computed with the same formulas as the calculator above — enter any values there for figures beyond this table.
Common questions
What does the GCD have to do with fractions?
Dividing the top and bottom of a fraction by their GCD reduces it fully: 48/36 divided by 12 gives 4/3, which cannot be simplified further.
How does the GCD Calculator work?
Find the largest whole number that divides two integers evenly, with their least common multiple shown as a cross-check. Integer a · Integer b → Greatest common divisor. The result updates as you type, and the formula and method on this page state the exact definitions used, so you can reproduce the calculation by hand.
What inputs does the GCD Calculator need?
Integer a · Integer b → Greatest common divisor. Invalid entries — such as a zero denominator, an out-of-range value or a malformed list — produce a plain-language message instead of a misleading number.
Is the GCD Calculator free to use?
Yes. It runs entirely in your browser with no sign-up, and the same calculator is available as an embeddable widget via the Embed button, so it can be placed on another site with its calculation intact.