About the GCD & LCM Calculator
The GCD and LCM Calculator is a free, browser-based tool that instantly computes the Greatest Common Divisor and Least Common Multiple of two numbers without requiring any sign-up or file uploads. The Greatest Common Divisor (GCD), also called the Highest Common Factor or Greatest Common Factor, is the largest positive integer that divides both numbers without remainder. The Least Common Multiple (LCM), also called the Lowest Common Multiple, is the smallest positive integer that is divisible by both numbers. Whether you need to simplify fractions, find common denominators, solve problems in number theory, or verify mathematical calculations, this tool eliminates manual computation and delivers accurate results instantly.
How GCD and LCM works
How the GCD and LCM Calculator Works
The calculator uses prime factorization and divisor analysis to determine both values simultaneously. Here's how it works:
GCD (Greatest Common Divisor): The tool identifies all factors common to every number in your set, then returns the largest common factor.
LCM (Least Common Multiple): The tool finds the smallest number that all input numbers divide into evenly by combining the highest powers of all prime factors.
Worked Example: Finding GCD and LCM of 24 and 56
Step 1: Prime Factorization
- 24 = 2^3 x 3^1
- 56 = 2^3 x 7^1
Step 2: Calculate GCD
Take the lowest power of each common prime factor:
GCD = 2^3 = 8
The number 8 divides both 24 (24 ÷ 8 = 3) and 56 (56 ÷ 8 = 7) with no remainder.
Step 3: Calculate LCM
Take the highest power of all prime factors that appear:
LCM = 2^3 x 3^1 x 7^1 = 8 x 3 x 7 = 168
The number 168 is divisible by both 24 (168 ÷ 24 = 7) and 56 (168 ÷ 56 = 3).
Simply enter your numbers separated by commas or spaces, and the calculator instantly displays both the GCD and LCM with verification that the results are correct.
How to use
- Enter your values as shown in the input box.
- The result is calculated instantly.
- Click Copy to use it.
Common uses
- Simplifying fractions by dividing both numerator and denominator by their GCD to reduce fractions to lowest terms
- Finding common denominators when adding or subtracting fractions with different denominators using the LCM
- Solving number theory problems, competitive math challenges, and homework assignments involving divisibility and multiples
- Scheduling and planning applications where you need to find when events coincide or repeat at regular intervals
- Verifying calculations when working with ratios, proportions, and problems involving least common denominators (LCD)
- Engineering and construction projects requiring precise measurements with common factors or repeating patterns