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.

Common searches this calculator answers include “hcf”, “common factor”, “least common multiple”, “calculate gcd and lcm”, “find gcd”.

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 gcd and lcm calculator used for?

Find the greatest common divisor and least common multiple. It helps with questions such as “hcf”, “common factor”, “least common multiple”.

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 the gcd and lcm 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 gcd and lcm 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