GCD and LCM Calculator
Calculate Greatest Common Divisor (GCD) and Least Common Multiple (LCM) with detailed step-by-step solutions
GCD & LCM Calculator
Enter Numbers
Fraction Simplifier
Use GCD to simplify fractions
Step-by-Step Solution
Enter numbers to see detailed calculation steps using the Euclidean algorithm.
Algorithms Used
Euclidean Algorithm (GCD):
Repeatedly apply: gcd(a,b) = gcd(b, a mod b) until remainder is 0
LCM Formula:
lcm(a,b) = (a × b) / gcd(a,b)
For Multiple Numbers:
Apply pairwise: gcd(a,b,c) = gcd(gcd(a,b),c)
Key Properties
Understanding GCD and LCM
Greatest Common Divisor (GCD)
The largest positive integer that divides each of the given numbers without remainder. Also called Greatest Common Factor (GCF) or Highest Common Factor (HCF).
Least Common Multiple (LCM)
The smallest positive integer that is divisible by each of the given numbers. Useful for adding/subtracting fractions and solving scheduling problems.
Euclidean Algorithm
Ancient efficient method for finding GCD. Based on the principle that gcd(a,b) = gcd(b, a mod b). Continues until remainder becomes zero.
Practical Applications
Used in fraction simplification, cryptography, music theory (rhythm), gear ratios, scheduling problems, and computer algorithms.
Related Calculators
Fraction Calculator
Operations with fractions using GCD/LCM
Prime Number Calculator
Prime factors and number theory
Basic Calculator
Basic arithmetic operations