GCD & LCM Calculator

Calculate Greatest Common Divisor (GCD/HCF) and Least Common Multiple (LCM) for multiple numbers with step-by-step steps.

  • 100% free
  • Private in browser
  • No signup
  • No watermarks

Calculation Summary

Greatest Common Divisor (GCD / HCF)12Largest integer dividing all [24, 36, 60]
Least Common Multiple (LCM)360Smallest positive multiple of [24, 36, 60]

Prime Factorization

24 =2^3 × 3
36 =2^2 × 3^2
60 =2^2 × 3 × 5

Step-by-Step Euclidean Algorithm Derivation

Calculating GCD and LCM for [24, 36, 60]:
--- Step 1: Euclidean division between 24 and 36 ---
24 = 36 × 0 + 24
36 = 24 × 1 + 12
24 = 12 × 2 + 0
GCD(24, 36) = 12
--- Step 2: Euclidean division between 12 and 60 ---
12 = 60 × 0 + 12
60 = 12 × 5 + 0
GCD(12, 60) = 12
Final GCD = 12
Final LCM = 360

Rate this tool

Be the first to rate — helps others and improves this page.

About GCD & LCM Calculator

Need to solve Greatest Common Divisor (GCD/HCF) or Least Common Multiple (LCM) problems for math homework, algorithm optimization, or fraction simplification? The GCD & LCM Calculator instantly processes two, three, or multiple integers simultaneously. It outputs the exact prime factorizations of all numbers and presents full Euclidean algorithm division steps.

How to use GCD & LCM Calculator

  1. Enter two or more positive integers separated by commas or spaces into the input box.
  2. View the instant GCD (HCF) and LCM values computed in real time.
  3. Inspect the prime factorization breakdown for each individual number.
  4. Review the detailed Euclidean division steps to understand the mathematical derivation.

Key features

  • Computes GCD and LCM for two or multiple numbers simultaneously
  • Step-by-step Euclidean division algorithm table explaining every remainder
  • Displays prime factorization with superscripts (e.g. 2^3 × 3^2 × 5)
  • Handles numbers up to 1,000,000,000 without performance lag
  • 100% free educational math tool running privately in your browser

Frequently asked questions

What is the relationship between GCD and LCM?
For any two positive integers a and b, their product equals the product of their GCD and LCM: a × b = GCD(a, b) × LCM(a, b).
How does the Euclidean algorithm work?
The Euclidean algorithm repeatedly divides the larger number by the smaller number and replaces the pair with the smaller number and the remainder, until the remainder is zero. The last non-zero remainder is the GCD.
Is GCD the same as HCF?
Yes. Greatest Common Divisor (GCD) and Highest Common Factor (HCF) are identical mathematical terms used interchangeably in curricula worldwide.
Can this tool compute GCD and LCM for more than two numbers?
Yes. You can enter three, four, or more integers (e.g. 12, 18, 24, 30) and the tool calculates the collective GCD and LCM sequentially.
Is my input data or calculations sent to any server?
No. All arithmetic and factorization routines execute 100% locally in your web browser JavaScript environment.