Browse All Calculators

GCD / LCM Calculator

Free GCD and LCM calculator. Find the greatest common divisor and least common multiple of two or more numbers, with Euclid steps and a prime factor table.

100% Free
No Sign-up
Instant Results
Works on Mobile

GCD / LCM Calculator

Try an example
Step-by-step working
  1. Start with the numbers: 48, 72.
  2. Euclidean algorithm for 48 and 72: 72 = 1 × 48 + 24; 48 = 2 × 24 + 0. The last divisor, 24, is their GCD.
  3. Prime factors: 48 = 2⁴ × 3; 72 = 2³ × 3².
  4. GCD uses the lowest power of each shared prime: 2³ × 3 = 24. LCM uses the highest power of every prime: 2⁴ × 3² = 144.
  5. Check with the link between them: 48 × 72 ÷ 24 = 144.
GCD and LCM of 48 and 72
GCD = 24LCM = 144
Greatest common divisor and least common multiple
Coprime
No
Ratio in lowest terms
2 : 3
Common divisors
8
GCD × LCM
3,456
Rules applied
  • Euclidean algorithm: divide the larger number by the smaller, then repeat with the divisor and the remainder until the remainder is 0. The last divisor is the GCD.
  • Prime factors: the GCD takes the lowest power of each shared prime, and the LCM takes the highest power of every prime.
  • GCD and LCM link: for two numbers, GCD × LCM = the first number × the second.
Check your answer
  • 24 divides each number evenly: 48 ÷ 24 = 2, 72 ÷ 24 = 3.
  • 144 is a multiple of each number: 144 ÷ 48 = 3, 144 ÷ 72 = 2.
  • After dividing by the GCD, the numbers 2, 3 have no common factor left.
Quick note
Use the GCD to simplify a fraction such as 48/72, and the LCM to find a common denominator.
GCD / LCM Calculator - find the GCD and LCM of numbers with steps and a prime factor table online on HighCalc

GCD / LCM Calculator: Greatest Common Divisor and Least Common Multiple

This free GCD and LCM calculator finds the greatest common divisor and the least common multiple of two or more whole numbers at the same time. It shows the Euclidean algorithm step by step, writes out the prime factors, and builds a table that makes it clear where each answer comes from. It is handy for simplifying fractions, finding common denominators and checking homework.

Quick answer: the GCD of 48 and 72 is 24 and their LCM is 144.

What Are the GCD and LCM?

The greatest common divisor, also called the greatest common factor or highest common factor, is the largest number that divides every number in your list without a remainder. The least common multiple, also called the lowest common multiple, is the smallest positive number that every number in the list divides into. One looks downwards for the biggest shared piece, and the other looks upwards for the first shared multiple.

How to Find the GCD with the Euclidean Algorithm

Divide the larger number by the smaller and note the remainder. Then divide the smaller number by that remainder, and keep going until the remainder is 0. The last divisor you used is the GCD. For 48 and 72, 72 = 1 × 48 + 24 and 48 = 2 × 24 + 0, so the GCD is 24. This method is fast even for very large numbers, which is why the calculator accepts values up to twelve digits.

Finding Both with Prime Factors

Write each number as a product of primes. The GCD takes the lowest power of every prime the numbers share, and the LCM takes the highest power of every prime that appears in any of them. The table in the results shows these powers in a grid, with the GCD and LCM rows highlighted. If you need the factors of a single number, the prime factorization calculator shows them with a factor tree. Some common pairs are shown below.

NumbersGCDLCM
12 and 18636
48 and 7224144
8 and 151120
100 and 7525300
14 and 49798
12, 18 and 306180
84, 126 and 210421,260

The Link Between GCD and LCM

For two numbers, the GCD multiplied by the LCM equals the product of the numbers. This means the LCM is the product divided by the GCD, which is the quickest way to find it once the GCD is known. If the GCD is 1, the numbers are coprime, and their LCM is simply their product. With three or more numbers, the calculator works through them one pair at a time.

Where GCD and LCM Are Used

The GCD simplifies fractions: divide the top and bottom by it and the fraction is in lowest terms. The LCM gives the least common denominator, so it is used whenever fractions with different denominators are added. Both also come up in scheduling, such as finding when two repeating events line up, and in dividing items into equal groups. For the fraction work itself, try the fraction calculator, and for general arithmetic, the scientific calculator, the math solver and the percentage calculator.

How to Use This GCD / LCM Calculator

1

Enter your numbers

Type whole numbers in the boxes or drag the sliders. Two boxes are ready for you.

2

Add more if needed

Press Add another number to include up to eight numbers, and Remove to take one away.

3

Read the answer

See the GCD and the LCM, and whether the numbers are coprime.

4

Follow the working

Check the Euclidean steps, the prime factors and the table.

Features

Instant Results
The answer updates as you type
Up to Eight Numbers
Two or more numbers at once
Large Numbers
Works with numbers up to twelve digits
Prime Factor Table
See how the GCD and LCM are built
Step-by-Step Working
Euclid steps and prime factors
Mobile Friendly
Works smoothly on phones, tablets and desktops
Frequently Asked Questions
Common questions about the GCD / LCM Calculator.
What is the GCD?
The GCD, or greatest common divisor, is the largest whole number that divides all the given numbers evenly. It is also called the greatest common factor (GCF) or highest common factor (HCF). For 48 and 72 the GCD is 24, because 24 goes into 48 twice and into 72 three times, and no larger number divides both.
What is the LCM?
The LCM, or least common multiple, is the smallest positive number that every given number divides into evenly. For 48 and 72 the LCM is 144, since 144 is a multiple of both and no smaller number is. It is also called the lowest common multiple and is used to find a common denominator when adding fractions.
How do I find the GCD and LCM of two numbers?
One way is the Euclidean algorithm: divide the larger number by the smaller, then divide the smaller by the remainder, and repeat until the remainder is 0. The last divisor is the GCD. Then LCM = (a × b) ÷ GCD. The other way is to compare prime factors. The calculator shows both.
How is the GCD related to the LCM?
For two numbers, the GCD multiplied by the LCM equals the product of the two numbers. With 48 and 72, 24 × 144 = 3,456, and 48 × 72 = 3,456 as well. This is the quickest way to get the LCM once you have the GCD. The rule does not extend directly to three or more numbers.
Can I find the GCD and LCM of more than two numbers?
Yes. Press Add another number to include up to eight numbers. The calculator finds the GCD and LCM of the first two, then combines that result with the next number, and so on. The steps show each stage, and the prime factor table shows how the final answers are built.
What does it mean when the GCD is 1?
The numbers are called coprime, or relatively prime: they share no prime factor. Their LCM is then simply their product. For example, 8 and 15 are coprime, so their GCD is 1 and their LCM is 120. A fraction made from coprime numbers is already in its simplest form.