Skip to content
Kordu Tools
Math & Numbers Runs in browser Updated 30 Mar 2026

GCD & LCM Calculator

Find the GCD and LCM of up to 10 numbers at once with step-by-step Euclidean algorithm and prime factorization methods.

Enter at least two valid positive integers.

Greatest Common Divisor

Coprime

Least Common Multiple

Relationship Verification

GCD(0, 0) × LCM(0, 0) = 0

|0 × 0| = 0

Verified: GCD × LCM = |a × b|

Prime Factorizations

Loading rating…

How to use GCD & LCM Calculator

  1. Enter your numbers

    Type two or more positive integers into the input fields. Click '+' to add more fields — up to 10 numbers supported.

  2. View GCD and LCM

    The greatest common divisor and least common multiple are calculated and displayed prominently.

  3. See the step-by-step working

    Click 'Show steps' to see the prime factorization method and Euclidean algorithm used to find each answer.

  4. Verify the relationship

    The relationship GCD × LCM = |a × b| is verified live below the results.

  5. Check if numbers are coprime

    When GCD equals 1, the numbers are coprime — the calculator highlights this automatically.

GCD & LCM Calculator FAQ

What is the GCD (greatest common divisor)?

The GCD is the largest number that divides all given numbers evenly with no remainder. Example: GCD(12, 8) = 4.

What is the LCM (least common multiple)?

The LCM is the smallest positive number that all given numbers divide into evenly. Example: LCM(4, 6) = 12.

How do I find the GCD using the Euclidean algorithm?

Repeatedly replace the larger number with the remainder from dividing larger by smaller until the remainder is 0. The last nonzero remainder is the GCD. Example: GCD(48, 18) → 48 mod 18 = 12 → 18 mod 12 = 6 → 12 mod 6 = 0, so GCD = 6.

How do I find the GCD using prime factorization?

Factor both numbers into primes, then multiply the common prime factors (using the lowest power). Example: 12 = 2² × 3, 8 = 2³ → GCD = 2² = 4.

How are GCD and LCM related?

For two numbers a and b: GCD(a,b) × LCM(a,b) = a × b. You can find the LCM from the GCD: LCM = (a × b) / GCD.

What does coprime mean?

Two numbers are coprime (or relatively prime) when their GCD is 1, meaning they share no common factor other than 1. Example: 8 and 15 are coprime.

What is the HCF?

HCF (highest common factor) is another name for GCD. It is more common in UK and Commonwealth school curricula.

Why do I need the LCM?

LCM is needed for adding fractions with different denominators (find the common denominator), scheduling repeating events, and number theory problems.

Can I calculate GCD for more than two numbers?

Yes. Add up to 10 numbers with the plus button. The GCD of multiple numbers is found by applying GCD pairwise.

Is any data sent to a server?

No. All calculations run entirely in your browser. Nothing is uploaded or stored.

Background

Calculate the GCD and LCM of up to ten numbers simultaneously. See the solution worked out step by step using both the prime factorization method and the Euclidean algorithm — which approach appears depends on the input size, but both are shown for educational value. The mathematical relationship GCD × LCM = |a × b| is verified live, helping students confirm their understanding. Supports the HCF (highest common factor) terminology used in UK and Commonwealth curricula. Ideal for homework involving simplifying fractions, finding common denominators, scheduling problems, and number theory. Add up to ten numbers with the plus button, and results update instantly as you type. All processing runs entirely in your browser.