Converter Web ToolsConverter WebTools

GCD & LCM Calculator

GCD & LCM Calculator — get the answer instantly in your browser, free and private.

Input
Output
Share Link
Settings

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

  1. Enter your values as shown in the input box.
  2. The result is calculated instantly.
  3. 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

Frequently asked questions

What is the difference between GCD and LCM?
GCD (Greatest Common Divisor) is the largest number that divides all numbers in your set with no remainder. LCM (Least Common Multiple) is the smallest number that all numbers in your set divide into evenly. For example, the GCD of 12 and 18 is 6, while the LCM is 36.
How do I use the GCD and LCM calculator?
Enter the two whole numbers in the fields and the tool instantly returns their greatest common divisor (GCD) and least common multiple (LCM).
What does it mean when the GCD of two numbers is 1?
When the GCD equals 1, the numbers are called coprime or relatively prime, meaning they share no common factors other than 1. For example, 9 and 16 have a GCD of 1 because they are coprime.
Why do I need the LCM?
The LCM is essential for finding common denominators when adding or subtracting fractions, for solving scheduling problems where you need to find when cycles repeat simultaneously, and for solving problems involving patterns and multiples in mathematics and engineering.
Does the calculator show the working steps?
The calculator instantly displays the GCD and LCM results. While this tool prioritizes speed and accuracy for immediate answers, you can verify results by checking that the GCD divides all your numbers evenly and that the LCM is divisible by all your numbers.
Is the calculator free and completely private?
Yes, the GCD and LCM Calculator is 100 percent free with no sign-up required, no account creation, and no files uploaded to any server. All calculations happen securely in your browser.