GCD & LCM Calculator

Greatest common divisor and least common multiple

GCD & LCM Calculator calculator — free online tool
🔒 Your data never leaves your device

GCD & LCM Calculator is a free online calculator that helps you greatest common divisor and least common multiple. Fill in First Number and Second Number and read your answer immediately. The result comes with a step-by-step breakdown — no black box, just math you can check. Great when you want certainty fast — no formulas to memorize, no apps to install. Your inputs never leave your device: the calculation is fully client-side, and optional analytics/advertising only activate with your consent. Searching for gcd lcm calculator greatest common divisor least common multiple or free online gcd & lcm calculator? This tool covers it — free, fast, and private. Bookmark it and the answer is always one click away.

What does the page calculator do?

GCD & LCM Calculator works out the gcd from the First Number and Second Number, following standard Utilities conventions — the page defaults produce a gcd of 6 | LCM: 36.

  • Inputs: First Number and Second Number.
  • Output: the gcd, plus the intermediate steps behind it.
  • Method: the standard Utilities formula, evaluated entirely in your browser.

Quick answer

With the default inputs (first number of 12, second number of 18), gcd & lcm calculator returns a gcd of 6 | LCM: 36. Assumptions and limits are summarized below.

How does it work?

GCD & LCM Calculator computes the gcd directly from your inputs — the First Number and Second Number feed the formula. Nothing is uploaded: the math runs locally in your browser and the result appears as you type.

What This Calculator Really Does

The greatest common divisor (GCD) is the largest number that divides two integers exactly; the least common multiple (LCM) is the smallest number they both divide into. This calculator runs the Euclidean algorithm for the GCD — showing each remainder step — and applies the identity GCD × LCM = a × b for the LCM.

The Euclidean algorithm is one of the oldest efficient procedures in mathematics, and it is still the right one: instead of factoring, it replaces the pair (a, b) with (b, a mod b) until the remainder hits zero. Three or four steps solve numbers whose prime factorization would take a page.

Everything runs locally in your browser: no numbers stored, nothing tracked, offline after the first visit.

Quick answer: gcd(48, 180) = 12 (remainders 36 → 12 → 0), and lcm(48, 180) = 48 × 180 ÷ 12 = 720.

The Method, Explained Plainly

Euclidean algorithm: repeatedly replace (a, b) with (b, a mod b) until b = 0; the last nonzero a is the GCD.

LCM identity: LCM(a, b) = (a × b) ÷ GCD(a, b)

For more than two numbers, fold pairwise: gcd(gcd(a, b), c), lcm(lcm(a, b), c).

How to Use It — In Order

  1. Enter two positive integers — order does not matter; the algorithm is symmetric in effect.
  2. Read the GCD — with the full remainder chain shown for verification.
  3. Read the LCM — computed via the identity, no factoring needed.
  4. Add more numbers — for several, the tool folds pairwise; check the running GCD only shrinks and the LCM only grows.
  5. Use it on fractions — GCD reduces a fraction to lowest terms; LCM is the common denominator for adding them.
  6. Sanity-check — the GCD must divide both inputs exactly; a quick division confirms it.

Worked Example, Verified by Hand

GCD(48, 180) by the Euclidean algorithm:

  1. 180 mod 48 = 36 (48 × 3 = 144, remainder 36).
  2. 48 mod 36 = 12.
  3. 36 mod 12 = 0 → stop. Last nonzero value: GCD = 12.
  4. LCM = 48 × 180 ÷ 12 = 8,640 ÷ 12 = 720.

Checks: 12 divides both (48 ÷ 12 = 4; 180 ÷ 12 = 15) ✓. 720 is a multiple of both (720 ÷ 48 = 15; 720 ÷ 180 = 4) ✓. Fraction reduction in action: 48/180 = 4/15 after dividing by the GCD.

Common Mistakes to Avoid

Limitations

Expected Accuracy

Integer-exact arithmetic — modulo and multiplication carry no rounding. Results are exact up to the precision limit of the platform's integers.

Privacy — Your Data Never Leaves This Device

Everything is computed locally: no inputs stored or sent, no tracking — the tool works offline too.

Related Tools & Guides

Natural next steps from GCD & LCM:

Sources & Standards

The Euclidean algorithm appears in Euclid's Elements (Book VII) and is unchanged in modern number theory.

Bottom Line

Remainders down to zero give the GCD; one multiplication and division gives the LCM. Two thousand years old and still the fastest way.

From Our Guides Library

Frequently Asked Questions

How do I calculate the GCD of two numbers?

Run the Euclidean algorithm: repeatedly replace the pair with (smaller, remainder of larger ÷ smaller) until the remainder is zero. For 48 and 180: remainders 36, 12, 0 → GCD 12.

How do I find the LCM?

LCM(a, b) = a × b ÷ GCD(a, b). For 48 and 180: 8,640 ÷ 12 = 720.

Why does the Euclidean algorithm work?

Any common divisor of a and b also divides a mod b, so each step preserves the greatest common divisor while shrinking the numbers — until the GCD is the last nonzero remainder.

What is the GCD used for?

Reducing fractions to lowest terms (48/180 → 4/15), simplifying ratios, and solving Diophantine problems — anywhere a shared divisor matters.

How do I find the GCD of three numbers?

Fold pairwise: gcd(gcd(a, b), c). The LCM folds the same way: lcm(lcm(a, b), c).

What is the relation between GCD and LCM?

For positive integers, GCD(a, b) × LCM(a, b) = a × b — the product counts shared factors twice, and dividing by the GCD leaves the least common multiple.

Is this calculator free and private?

Yes — it runs entirely in your browser with no sign-up, no upload and no tracking.

What does the tool calculate?

This page is a working gcd & lcm calculator: enter your values, read the figure, and follow the step list to see exactly how the answer was derived. Because it is fast and private — GCD & LCM Calculator runs entirely in your browser, nothing is uploaded, and no account is needed.

How is the result calculated?

The first steps are gcd(12,18) via euclidean algorithm = 6, then lcm = 12×18 / 6 = 36. Rounding follows standard display conventions — the underlying math keeps several decimal places until the gcd is shown.

What do I need to use the GCD & LCM Calculator?

The First Number and Second Number it asks for, or the page defaults if you just want to see the calculation work. Each input maps directly to the formula, and changing any one of them recalculates the gcd instantly.

What does the result from the tool mean?

The main number the gcd & lcm calculator returns is the gcd for your exact inputs, and the supporting figures and step list give it context. The model behind GCD & LCM Calculator covers the standard case; special cases, edge values, or jurisdiction-specific rules may need manual adjustment.

When is the page most useful?

Typical uses for GCD & LCM Calculator include planning and budgeting, comparing scenarios side by side, and double-checking a figure before acting on it — anywhere the figure needs to be defensible rather than guessed. On this page, gcd & lcm calculator applies the standard Utilities method to your inputs and lists every step of the working beside the result.

About this page: Built on documented public formulas, hand-checked against worked examples and covered by automated tests on every build. See our editorial policy for how content is written and verified. Last reviewed: 2026-09-22
⚠️ General Disclaimer: Results are estimates for informational and educational purposes only. Verify independently before making important decisions.

About CalcProMaster calculators

CalcProMaster is a free library of 1206 online calculators across 20 categories — finance, health, math, business, construction, engineering, conversion, education and more. Every calculator runs entirely in your browser: no sign-up, no paywall, and no data leaves your device.

What makes these calculators different is transparency. Each tool shows the exact formula it uses and a step-by-step breakdown of how your inputs become the result, so you can verify the math instead of trusting a black box. Result interpretation, common mistakes, assumptions and limitations are documented on every calculator page, alongside worked examples and an FAQ. Health and finance tools cite the standard formulas they follow — Mifflin-St Jeor for calorie needs, standard amortization for loans — and state plainly where a calculator's answer should be confirmed with a professional.

The guides library goes deeper on the calculations people search for most: percentage and discount math, loan EMI and amortization, income-tax brackets, calorie and macro planning, concrete volumes and more — each with the formula, worked examples and links to the matching calculator. The glossary defines the terminology in plain language, and the public formula QA dashboard shows the verification status of every calculator's math.

Popular starting points: loan EMI calculator, BMI calculator, percentage calculator, random number generator, and concrete calculator — or browse a category above to find the tool you need.

↑ ↓ navigate↵ openesc close