GCD & LCM Calculator
Calculate the Greatest Common Divisor (GCD/HCF) and Least Common Multiple (LCM) of two or more numbers instantly.
✓ Runs in your browser · Updated 2026-03-31Enter values and click Find GCD & LCM to see results
What is GCD (Greatest Common Divisor)?
The GCD (also called HCF — Highest Common Factor) is the largest positive integer that divides each of the given numbers without a remainder. For example, GCD(12, 18) = 6.
GCD(a, b) = GCD(b, a mod b), until b = 0, then GCD = a
For 3+ numbers: GCD(a, b, c) = GCD(GCD(a, b), c)
What is LCM (Least Common Multiple)?
The LCM is the smallest positive integer that is a multiple of all the given numbers. For example, LCM(4, 6) = 12.
For 3+ numbers: LCM(a, b, c) = LCM(LCM(a, b), c)
Relationship Between GCD and LCM
For two numbers, there is an elegant relationship: GCD(a, b) × LCM(a, b) = a × b. This property is useful for verifying calculations.
Related Tools
Use our Fraction Calculator which uses GCD for simplification, or the Ratio Calculator for simplifying ratios.
Frequently Asked Questions
What is GCD used for?
GCD (Greatest Common Divisor) is used to simplify fractions, find common factors, and solve problems in number theory. Also called HCF (Highest Common Factor) in Indian syllabuses.