Finding GCD
The GCD is the largest positive integer that divides all given numbers without remainder. Use the Euclidean algorithm for efficient calculation: repeatedly divide and take remainders until you reach 0.
LCM and GCD are the foundation of fraction arithmetic — adding fractions requires LCM to find the common denominator, while simplifying fractions requires GCD to reduce to lowest terms. Beyond basic math, GCD (computed via Euclid's algorithm) is used in cryptography to check coprimality of RSA keys, in gear ratio calculations in mechanical engineering, and in scheduling problems where you need to find when recurring events coincide. Enter up to multiple numbers at once for batch computation.
Input two or more positive integers separated by commas.
Select LCM, GCD, or both calculations.
View Euclidean algorithm, prime factorization, or both.
See LCM/GCD with step-by-step solution.
GCD is the largest number that divides all given numbers. LCM is the smallest number divisible by all given numbers.
LCM(a,b) × GCD(a,b) = a × b
GCD (Greatest Common Divisor) is also called HCF (Highest Common Factor)
LCM × GCD = Product of the two numbers (for 2 numbers)
If GCD = 1, the numbers are coprime (no common factors)
Use GCD to simplify fractions: divide numerator and denominator by their GCD
LCM is useful for finding common denominators when adding fractions
The Euclidean algorithm efficiently finds GCD by repeated division
Calculate the Least Common Multiple (LCM) and Greatest Common Divisor (GCD/HCF) with step-by-step solutions using Euclidean algorithm and prime factorization.
The GCD is the largest positive integer that divides all given numbers without remainder. Use the Euclidean algorithm for efficient calculation: repeatedly divide and take remainders until you reach 0.
The LCM is the smallest positive integer divisible by all given numbers. Calculate using prime factorization (take highest powers) or the formula: LCM = (a × b) / GCD.