GCD & LCM Calculator
Enter your details below and get an instant result.
Separate numbers with commas, spaces, or line breaks. Use whole numbers only.
GCD & LCM Calculator
A GCD & LCM Calculator is a free online math tool that helps you find the Greatest Common Divisor (GCD) and Least Common Multiple (LCM) of two or more whole numbers.
Instead of calculating factors and multiples manually, you can enter your numbers and instantly find both results.
Calculator Pool’s free GCD & LCM Calculator online supports multiple whole numbers and can process values entered using commas, spaces, or line breaks.
For example, if you enter:
12, 18, 24
the calculator gives:
GCD = 6
LCM = 72
This makes the tool useful for students, teachers, homework, mathematics practice, and everyday number calculations.
What Is GCD?
GCD stands for Greatest Common Divisor.
It is the largest positive whole number that divides two or more numbers without leaving a remainder.
For example, consider:
12 and 18
The factors of 12 are:
1, 2, 3, 4, 6, 12
The factors of 18 are:
1, 2, 3, 6, 9, 18
The common factors are:
1, 2, 3, 6
The greatest one is:
6
Therefore:
GCD(12, 18) = 6
The GCD is also commonly called the Greatest Common Factor (GCF) in some mathematical contexts.
What Is LCM?
LCM stands for Least Common Multiple.
It is the smallest positive number that is a multiple of two or more numbers.
For example:
Multiples of 4:
4, 8, 12, 16, 20, 24…
Multiples of 6:
6, 12, 18, 24, 30…
The common multiples include:
12, 24, 36…
The smallest positive common multiple is:
12
Therefore:
LCM(4, 6) = 12
What Is a GCD & LCM Calculator?
A GCD & LCM Calculator is an online tool that calculates both the greatest common divisor and least common multiple of multiple whole numbers.
Calculator Pool’s calculator provides:
- GCD
- LCM
- Number of values entered
- Input values
- Basic explanations of GCD and LCM
You can enter two or more whole numbers and get the results instantly.
How to Use the GCD & LCM Calculator
Using Calculator Pool’s GCD & LCM Calculator online is simple.
Step 1: Enter Your Numbers
Enter two or more whole numbers.
For example:
12, 18, 24
You can separate numbers using:
- Commas
- Spaces
- Line breaks
Step 2: Click Calculate
Select:
Calculate GCD & LCM
Step 3: View the Results
The calculator shows:
GCD
LCM
along with the number of values entered and a brief explanation.
GCD Formula
For two numbers, the GCD is the largest positive integer that divides both numbers exactly.
For example:
GCD(24, 36)
Factors of 24:
1, 2, 3, 4, 6, 8, 12, 24
Factors of 36:
1, 2, 3, 4, 6, 9, 12, 18, 36
The greatest common factor is:
12
Therefore:
GCD(24, 36) = 12
For larger numbers, algorithms such as the Euclidean algorithm provide an efficient way to calculate the GCD.
LCM Formula
For two positive integers, the LCM can be calculated using the relationship:
LCM(a, b) = |a × b| ÷ GCD(a, b)
Example
Take:
a = 12
b = 18
We already know:
GCD(12, 18) = 6
Therefore:
LCM = (12 × 18) ÷ 6
LCM = 216 ÷ 6
LCM = 36
So:
LCM(12, 18) = 36
GCD Example
Let’s calculate the GCD of:
20 and 30
Factors of 20:
1, 2, 4, 5, 10, 20
Factors of 30:
1, 2, 3, 5, 6, 10, 15, 30
Common factors:
1, 2, 5, 10
Greatest common factor:
10
Therefore:
GCD = 10
LCM Example
Let’s calculate the LCM of:
8 and 12
Multiples of 8:
8, 16, 24, 32, 40…
Multiples of 12:
12, 24, 36, 48…
First common positive multiple:
24
Therefore:
LCM = 24
GCD & LCM Example Together
Consider:
12 and 18
GCD
Common factors:
1, 2, 3, 6
Therefore:
GCD = 6
LCM
Multiples of 12:
12, 24, 36, 48…
Multiples of 18:
18, 36, 54…
Therefore:
LCM = 36
So:
GCD = 6
LCM = 36
GCD and LCM of 3 Numbers
The GCD & LCM Calculator can work with more than two whole numbers.
For example:
12, 18, 24
GCD
GCD of 12 and 18:
6
GCD of 6 and 24:
6
Therefore:
GCD = 6
LCM
LCM of 12 and 18:
36
LCM of 36 and 24:
72
Therefore:
LCM = 72
So:
GCD(12, 18, 24) = 6
LCM(12, 18, 24) = 72
GCD & LCM Calculation Table
| Numbers | GCD | LCM |
|---|---|---|
| 4, 6 | 2 | 12 |
| 6, 9 | 3 | 18 |
| 8, 12 | 4 | 24 |
| 10, 15 | 5 | 30 |
| 12, 18 | 6 | 36 |
| 12, 18, 24 | 6 | 72 |
| 15, 20 | 5 | 60 |
| 18, 24 | 6 | 72 |
GCD vs LCM
GCD and LCM are related but they answer different questions.
GCD
Finds the largest number that divides all the given numbers.
LCM
Finds the smallest positive number that is divisible by all the given numbers.
For example, for:
8 and 12
GCD = 4
LCM = 24
So GCD works with common factors, while LCM works with common multiples.
Difference Between GCD and GCF
GCD means Greatest Common Divisor.
GCF means Greatest Common Factor.
For positive whole numbers, these terms describe the same mathematical value.
For example:
GCD(12, 18) = 6
and:
GCF(12, 18) = 6
Some textbooks use GCF while others use GCD.
GCD Using the Euclidean Algorithm
The Euclidean algorithm is an efficient method for calculating the GCD of two numbers.
Suppose we want:
GCD(48, 18)
Divide:
48 ÷ 18 = 2 remainder 12
Then:
18 ÷ 12 = 1 remainder 6
Then:
12 ÷ 6 = 2 remainder 0
When the remainder becomes zero, the last non-zero remainder is the GCD.
Therefore:
GCD(48, 18) = 6
A GCD calculator performs this type of mathematical calculation automatically.
Finding LCM Using Prime Factorization
Prime factorization can also be used to calculate the LCM.
Consider:
12 and 18
Prime factorization:
12 = 2² × 3
18 = 2 × 3²
For the LCM, take the highest power of every prime:
LCM = 2² × 3²
= 4 × 9
= 36
Therefore:
LCM(12, 18) = 36
Finding GCD Using Prime Factorization
Using the same example:
12 = 2² × 3
18 = 2 × 3²
For the GCD, take the lowest power of each common prime:
GCD = 2¹ × 3¹
= 6
Therefore:
GCD(12, 18) = 6
Relationship Between GCD and LCM
For two positive integers:
GCD(a, b) × LCM(a, b) = a × b
Example
For:
12 and 18
GCD:
6
LCM:
36
Therefore:
6 × 36 = 216
and:
12 × 18 = 216
Both sides are equal.
This relationship is useful for checking calculations involving two positive integers.
GCD Calculator for Fractions
GCD is useful when simplifying fractions.
Suppose you have:
24/36
The GCD of 24 and 36 is:
12
Divide both numerator and denominator by 12:
24 ÷ 12 = 2
36 ÷ 12 = 3
Therefore:
24/36 = 2/3
Calculator Pool’s Fraction Calculator can be used for fraction calculations and simplification.
LCM for Adding Fractions
LCM is useful when adding fractions with different denominators.
Consider:
1/4 + 1/6
The LCM of 4 and 6 is:
12
Convert:
1/4 = 3/12
1/6 = 2/12
Then:
3/12 + 2/12 = 5/12
Therefore:
1/4 + 1/6 = 5/12
This is one reason LCM is important in fraction arithmetic.
GCD & LCM Calculator for Students
Students commonly encounter GCD and LCM in:
- Arithmetic
- Fractions
- Number theory
- Factors and multiples
- Word problems
- Algebra
- Mathematical reasoning
An online GCD LCM calculator can help students check their answers and understand the difference between factors and multiples.
GCD & LCM in Everyday Problems
GCD and LCM are not limited to classroom mathematics.
They can help solve problems involving:
- Repeating schedules
- Grouping objects
- Packaging
- Dividing items equally
- Matching recurring events
- Measurement
- Fraction calculations
Choosing between GCD and LCM depends on the type of problem.
GCD for Equal Grouping
GCD is especially useful when you want to divide quantities into the largest possible equal groups.
Example
Suppose you have:
24 apples
and:
36 oranges
You want to create the largest number of identical groups without leftovers with our Free GCD & LCM Calculator Online.
The GCD is:
12
Therefore, you can make:
12 equal groups
Each group contains:
2 apples
and:
3 oranges
This is a classic application of the greatest common divisor.
LCM for Repeating Events
LCM is useful when two events repeat at different intervals and you want to know when they will occur together again.
Suppose:
Event A happens every:
4 days
Event B happens every:
6 days
The LCM of 4 and 6 is:
12
Therefore, under these assumptions, the events coincide every:
12 days
This is a common real-world application of the least common multiple.
GCD of Multiple Numbers
The GCD can be calculated for more than two numbers.
For example:
18, 30, 42
GCD of 18 and 30:
6
GCD of 6 and 42:
6
Therefore:
GCD = 6
The same principle can be extended to larger datasets.
LCM of Multiple Numbers
LCM can also be calculated for three or more numbers.
Example:
4, 6, 8
LCM of 4 and 6:
12
LCM of 12 and 8:
24
Therefore:
LCM = 24
GCD and LCM of Coprime Numbers
Two numbers are coprime when their GCD is:
1
For example:
8 and 15
have no common factor other than 1.
Therefore:
GCD(8, 15) = 1
When two positive integers are coprime:
LCM = Product of the two numbers
So:
LCM(8, 15) = 8 × 15 = 120
What Are Factors?
A factor is a whole number that divides another number exactly.
For example, the factors of:
12
are:
1, 2, 3, 4, 6, 12
Factors help us find GCD because GCD is the greatest factor common to the given numbers.
What Are Multiples?
A multiple is the result of multiplying a number by a whole number.
For example, multiples of 5 are:
5, 10, 15, 20, 25, 30…
Multiples help us find LCM because LCM is the smallest positive multiple common to all the given numbers.
Prime Numbers and GCD/LCM
GCD & LCM Calculator – Prime numbers have exactly two positive factors:
1 and the number itself
Examples include:
2, 3, 5, 7, 11, 13
Prime factorization is a useful method for calculating both GCD and LCM.
GCD & LCM With Zero
Zero requires special treatment.
For example:
GCD(a, 0) = |a|
for a non-zero integer a.
For LCM:
LCM(a, 0) = 0
under the standard convention.
Calculator Pool’s tool is primarily designed for whole-number calculations and handles its input according to its built-in calculation rules for this GCD & LCM Calculator.
Can Negative Numbers Be Used?
The calculator is intended for whole-number input. The magnitude of a negative integer can be considered when discussing GCD and LCM mathematically, but the standard definitions typically use non-negative values for the resulting GCD and LCM as per the GCD & LCM Calculator.
For everyday calculator use, positive whole numbers are the simplest inputs.
Why Use an Online GCD & LCM Calculator?
Manually finding factors and multiples becomes time-consuming when numbers are large.
A GCD calculator online can:
- Find GCD instantly
- Find LCM instantly
- Handle multiple numbers
- Reduce manual calculations
- Help check homework
- Save time
- Explain the result
Calculator Pool’s tool lets you enter multiple whole numbers in one calculation.
Benefits of Calculator Pool’s GCD & LCM Calculator
Calculator Pool’s free GCD and LCM calculator is designed for quick mathematical calculations.
You can enter:
Two numbers
or:
Multiple numbers
The calculator then provides:
Greatest Common Divisor
Least Common Multiple
along with the number of input values.
This makes the tool useful for schoolwork, practice, teaching, and everyday mathematical problems.
Common GCD and LCM Mistakes
Confusing Factors With Multiples
Factors divide a number exactly.
Multiples are produced by multiplication.
Choosing the Smallest Common Factor
GCD means the greatest common divisor, not the smallest.
Choosing the Largest Common Multiple
LCM means the least common multiple, not the largest.
Forgetting to Simplify
When using GCD to simplify a fraction, both numerator and denominator should be divided by the same GCD.
Using the Wrong Formula
For two positive integers:
GCD × LCM = Product of the Numbers
is a useful relationship for checking your answer for this GCD & LCM Calculator.
GCD & LCM Worked Examples
Example 1: 15 and 25
GCD:
5
LCM:
75
Check:
5 × 75 = 375
15 × 25 = 375
Correct.
Example 2: 18 and 24
GCD:
6
LCM:
72
Check:
6 × 72 = 432
18 × 24 = 432
Correct.
Example 3: 20 and 30
GCD:
10
LCM:
60
Check:
10 × 60 = 600
20 × 30 = 600
Correct.
Example 4: 8, 12 and 20
GCD:
4
LCM:
120
Therefore:
GCD = 4
LCM = 120
Frequently Asked Questions
What is a GCD & LCM Calculator?
A GCD & LCM Calculator is an online tool that finds the greatest common divisor and least common multiple of two or more whole numbers.
What does GCD stand for?
GCD stands for Greatest Common Divisor.
What does LCM stand for?
LCM stands for Least Common Multiple.
What is the GCD of 12 and 18?
The GCD of 12 and 18 is:
6
What is the LCM of 12 and 18?
The LCM of 12 and 18 is:
36
What is the GCD of 8 and 12?
The GCD is:
4
What is the LCM of 8 and 12?
The LCM is:
24
What is the difference between GCD and LCM?
GCD is the greatest number that divides all the given numbers. LCM is the smallest positive number divisible by all the given numbers in our GCD & LCM Calculator.
Is GCD the same as GCF?
For positive whole numbers, GCD and GCF generally refer to the same value. GCF means Greatest Common Factor.
How do I find GCD manually?
You can list the factors of each number and select the greatest common factor, or use the Euclidean algorithm.
How do I find LCM manually?
You can list multiples, use prime factorization, or use the relationship between GCD and LCM for two positive numbers in this GCD & LCM Calculator.
What is the formula connecting GCD and LCM?
For two positive integers:
GCD(a,b) × LCM(a,b) = a × b
Can I calculate GCD and LCM of more than two numbers?
Yes. Calculator Pool’s tool accepts two or more whole numbers.
Is LCM always larger than GCD?
For positive integers, the LCM is generally greater than or equal to the GCD. They can be equal for some inputs, such as when all the numbers are identical.
Can I use GCD for simplifying fractions?
Yes. The GCD can be used to divide the numerator and denominator by their greatest common divisor.
Why is LCM useful for fractions?
LCM can be used to find a common denominator when adding or subtracting fractions with different denominators.
Can GCD be used for equal grouping?
Yes. GCD can help determine the largest number of equal groups that can be formed without leftovers.
Can LCM be used for repeating schedules?
Yes. LCM can help identify when repeating cycles line up again.
Is the GCD & LCM Calculator free?
Yes. Calculator Pool’s GCD & LCM Calculator is free to use online.
Related Calculators
You may also find these Calculator Pool tools useful:
Fraction Calculator
Add, subtract, multiply, and divide fractions and simplify the results.
Ratio Calculator
Simplify ratios, compare two ratios, and check whether two ratios are equivalent.
Percentage Calculator
Calculate percentages, percentage increases, decreases, and other percentage problems.
Average Calculator
Calculate the average, sum, count, minimum, and maximum of a list of numbers.
Probability Calculator
Calculate basic theoretical probability using favorable and total possible outcomes.
Percentage Change Calculator
Calculate percentage increases and decreases between two values.
GCD & LCM Calculator – Quick Summary
A GCD & LCM Calculator helps you quickly find two important number-theory values:
GCD — Greatest Common Divisor
LCM — Least Common Multiple
For example, with:
12 and 18
the GCD is:
6
and the LCM is:
36
The GCD is the largest positive number that divides all the given values, while the LCM is the smallest positive number that is a multiple of all the values.
For two positive integers:
GCD × LCM = Product of the Numbers
The GCD is useful for simplifying fractions and dividing quantities into equal groups, while the LCM is useful for finding common denominators and matching repeating cycles.
Use Calculator Pool’s free GCD & LCM Calculator online to calculate GCD and LCM for two or more whole numbers quickly and easily.