Utinzo

GCD & LCM Calculator

Calculate the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of two or three numbers.

GCD
6
LCM144
Factors of 4848 = 1, 2, 3, 4, 6, 8, 12, 16, 24, 48
Factors of 1818 = 1, 2, 3, 6, 9, 18

Did this tool work for you?

AdSense336 × 280
AdSense336 × 280

How to use this calculator

GCD via Euclidean algorithm; LCM(a,b) = |a×b| / GCD(a,b)

GCD is found by repeatedly dividing the larger number by the smaller and taking remainders until zero. LCM is derived from GCD.

  1. 1

    Enter two or three positive integers.

  2. 2

    Leave the third number as 0 to calculate for just two numbers.

  3. 3

    The calculator shows GCD and LCM with factor lists for verification.

AdSense · 728 × 90

Frequently asked questions

What is GCD used for?

GCD (Greatest Common Divisor, also called HCF — Highest Common Factor) is used to simplify fractions. The fraction 48/18 simplifies to 8/3 by dividing both by GCD(48,18) = 6. It is also used in ratio simplification and modular arithmetic.

What is LCM used for?

LCM (Least Common Multiple) is used to add or subtract fractions with different denominators (find the common denominator), determine when repeating events coincide, and solve problems involving gear ratios, traffic lights, or scheduling.

How does the Euclidean algorithm work?

GCD(48, 18): divide 48 by 18, remainder 12. GCD(18, 12): divide 18 by 12, remainder 6. GCD(12, 6): divide 12 by 6, remainder 0. When remainder is 0, the divisor (6) is the GCD. This algorithm is O(log n) — very efficient even for large numbers.

What is the relationship between GCD and LCM?

GCD(a,b) × LCM(a,b) = a × b. This means once you have the GCD, you can always find the LCM quickly without listing multiples: LCM = (a × b) / GCD.

About gcd & lcm calculator

GCD and LCM in mathematics

Finding GCD using the Euclidean algorithm

The Euclidean algorithm is one of the oldest algorithms in existence, described by Euclid around 300 BC. It works by repeated division: GCD(a,b) = GCD(b, a mod b), stopping when the remainder is 0. It is efficient enough to handle numbers with thousands of digits.

Finding LCM by listing multiples

For small numbers, you can list multiples of each and find the first common one. Multiples of 4: 4, 8, 12, 16… Multiples of 6: 6, 12… LCM = 12. For larger numbers, use LCM = (a×b)/GCD — far more efficient.

GCD and LCM with more than two numbers

For three numbers, apply GCD/LCM iteratively: GCD(a,b,c) = GCD(GCD(a,b), c). Same for LCM. This extends to any number of inputs. Useful in scheduling problems where multiple cycles must align.

GCD & LCM Calculator – Utinzo

Learn more from an authoritative source:

Wikipedia
Related tools

Results are estimates for informational purposes only and do not constitute professional financial, medical, legal, or technical advice. Read full disclaimer →