GCD & LCM Calculator
Find the greatest common divisor and least common multiple of two nonnegative whole numbers.
YOUR SHORTCUTS
Continue where you left off
Recently used
Your favorites
These shortcuts remember only calculator names on this device, not the values you enter.
GCD & LCM Calculator
View complete schedule
ⓘ Calculated locally in your browser. Results depend on the values and units you enter.
Interactive mathematical graph
The axes, points and dimensions are recalculated from the values you enter.
Enter valid values to draw this graph.
Interpretation:
Graph data (accessible table)
| Reference | X | Y |
|---|
What changes if one input changes?
43: 1 GCD · 48: 12 GCD · 53: 1 GCD
This combination has no safe comparable results. Check the inputs above or select another value.
How this calculator works
The greatest common divisor (GCD, also called GCF) is the largest whole number that divides both inputs. The least common multiple (LCM) is the smallest nonnegative common multiple. The Euclidean algorithm finds the GCD exactly, then LCM = (a ÷ GCD) × b for two nonzero numbers. GCD(0, 0) is undefined.
Formula and reasoning
gcd(a,0) = a; gcd(a,b) = gcd(b, a mod b)
- 1. Start with the measurementsFirst whole number48Second whole number180
- 2. Substitute into the formula
First whole number = 48 ? Second whole number = 180
- 3. Check the computed answer
Result for the sample inputs
Worked example
Frequently asked questions
Are decimal numbers accepted?
No. GCD and LCM operate on whole numbers; enter nonnegative integers.
What if one number is zero?
The GCD is the nonzero number and the LCM is zero. Both zero is rejected as undefined.
Results are informational and assume the stated inputs and formulas. Double-check critical financial or engineering decisions with a qualified professional.
Was this calculator helpful?
Your feedback helps you keep track of useful tools on this device.
Your selection stays in this browser. No public vote count is shown.
Prefer EverydayCalc on Google
Opens Google source preferences. Availability and placement are determined by Google; this does not guarantee higher rankings.