CalcDepo

GCD and LCM Calculator

Find the greatest common divisor and least common multiple.

Inputs

Results

GCD12
LCM720

Chart

Not what you need? Search by intent

Describe what you want to find โ€” โ€œhcfโ€ โ€” and jump to the right calculator.

How to use the gcd and lcm calculator

Find the greatest common divisor and least common multiple. Enter number a, number b in the fields above; the gcd, lcm are computed instantly and plotted on the chart so you can see how the answer changes.

Formula

GCD = gcd(a,b)
LCM = lcm(a,b)

Variables

  • a โ€” Number a
  • b โ€” Number b

Worked example

With number a = 48, number b = 180, the calculator gives gcd โ‰ˆ 12; lcm โ‰ˆ 720.

Frequently asked questions

What is the formula for the gcd and lcm calculation?

GCD = gcd(a,b). LCM = lcm(a,b). Here a is number a, b is number b.

What inputs do I need for the gcd and lcm calculator?

You need number a, number b. Each field is pre-filled with a typical example so you can see how the result responds as you edit the numbers.

How do I use this calculator?

Type values into the input fields. Results and the chart update instantly. Use Reset to restore the example values, Copy results to paste them elsewhere, or Share to copy a link that preserves your inputs.

Is the result exact?

Calculations use standard formulas and double-precision arithmetic, then display about seven significant figures. Real-world measurements carry uncertainty, so treat results as estimates unless your inputs are exact.

Related calculators

More in Algebra & Calculus: Percentage ยท Percent Increase and Decrease ยท Ratio Simplifier ยท Divisor Count ยท Quadratic Equation ยท Linear Equation ยท System of Two Linear Equations ยท Slope Between Two Points