Home Math & Calculator Tools GCD & LCM Calculator
🔗
Math & Calculator Tools

GCD & LCM Calculator

Find the Greatest Common Divisor and Least Common Multiple of two or more numbers — with prime factorisation and step-by-step working.

⚡ Instant calculation 🔒 Private — runs in your browser 🚫 No login required 📋 Copy or download results
🔗 GCD & LCM Calculator
🔗

Enter your figures and click Calculate to see your results.

📖How to Use the GCD & LCM Calculator

  1. 1
    Enter your values

    Enter two or more numbers separated by commas — the calculator finds both GCD and LCM with prime factorisation steps.

  2. 2
    Click Calculate

    Press the Calculate button. All results appear instantly — no page reload, no waiting.

  3. 3
    Read and use your results

    Results appear in the panel on the right with all key values clearly labelled. Use Copy to grab the result or Download to save a text file.

💡When to Use This Calculator

SituationWhy It Helps
Financial planning Make informed decisions
Business analysis Support data-driven choices
Personal finance Understand your numbers

Frequently Asked Questions

What is the GCD?

The Greatest Common Divisor (GCD), also called HCF (Highest Common Factor), is the largest number that divides all given numbers without remainder. GCD(48, 18) = 6, because 6 is the largest divisor shared by both. It is found using the Euclidean algorithm: GCD(a,b) = GCD(b, a mod b).

What is the LCM?

The Least Common Multiple (LCM) is the smallest positive integer divisible by all given numbers. LCM(4, 6) = 12 — the smallest number into which both 4 and 6 divide exactly. LCM is essential for finding common denominators when adding or subtracting fractions with different denominators.

What is the GCD-LCM relationship?

For any two positive integers: GCD(a,b) × LCM(a,b) = a × b. Once you know the GCD, you can find the LCM: LCM = (a × b) / GCD. For 12 and 18: GCD = 6, so LCM = (12×18)/6 = 36. This relationship also means GCF × LCM always equals the product of the original numbers.

How does the Euclidean algorithm work?

The Euclidean algorithm repeatedly applies GCD(a,b) = GCD(b, a mod b). For GCD(48,18): GCD(48,18) → GCD(18,12) → GCD(12,6) → GCD(6,0) = 6. It stops when the remainder is 0. This is one of the oldest known algorithms, described by Euclid around 300 BC, and is extremely efficient.

How do I find GCD and LCM of more than two numbers?

Apply the operation sequentially: GCD(a,b,c) = GCD(GCD(a,b),c). For three numbers 12, 18, 24: GCD(12,18)=6, then GCD(6,24)=6. Similarly for LCM: LCM(12,18)=36, then LCM(36,24)=72. This calculator handles multiple numbers automatically in one step.