GCD & LCM Calculator
Calculate the Greatest Common Divisor (GCD/HCF) and Least Common Multiple (LCM) of two or more numbers instantly.
Enter values and click Find GCD & LCM to see results
Formula
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.
Is this calculator free, and do I need to sign up?
Yes, it is completely free with no sign-up. There are no usage limits and no paywalls.
Are my inputs saved or sent to any server?
No. Every calculation happens entirely in your browser. Nothing you type is uploaded, logged, or shared with us or any third party.