Transparent method
The formula
Worked example
Example inputs
How to interpret the result
GCF and LCM solve two different practical problems that happen to use related math. GCF is what actually simplifies a fraction to its lowest terms, while LCM is what finds a common denominator for adding or comparing fractions with different denominators, and confusing which one a specific task calls for produces the wrong kind of answer entirely.
Before you rely on it
What to check
Identify which task you're actually solving, simplifying a fraction calls for GCF, finding a common denominator calls for LCM, before reading which of the two numbers applies.
The common error
Where people go wrong with GCF & LCM calculator
Using LCM when a fraction actually needs simplifying, or GCF when a common denominator is needed. The two numbers solve different problems, and swapping them produces an answer that doesn't fit the task at hand.
Sensitivity evidence
How first number changes the greatest common factor
| First number | Greatest common factor | Least common multiple |
|---|---|---|
| 19 | 1 | 684 |
| 22 | 2 | 396 |
| 24worked example | 12 | 72 |
| 26 | 2 | 468 |
| 29 | 1 | 1,044 |
Every input, tested
Which input moves the greatest common factor most
| Input | Tested from | To | Greatest common factor at each end | Swing |
|---|---|---|---|---|
| First number | 22 | 26 | 2 to 2 | none |
| Second number | 32 | 40 | 8 to 8 | none |
Two variables at once
Greatest common factor by first number and second number
| First number \ Second number | 29 | 36 | 43 |
|---|---|---|---|
| 19 | 1 | 1 | 1 |
| 22 | 1 | 2 | 1 |
| 24 | 1 | 12 | 1 |
| 26 | 1 | 2 | 1 |
| 29 | 29 | 1 | 1 |
Step by step
The worked example, input by input
| Input | Value used |
|---|---|
| First number | 24 |
| Second number | 36 |
| Greatest common factor | 12 |
| Least common multiple | 72 |
Where the inputs come from
Enter two whole numbers. The greatest common factor is the largest number dividing both, found with the Euclidean algorithm, and the least common multiple is the smallest number both divide into, equal to their product divided by the GCF. Use positive integers; zero is a special case. If you have more than two numbers, compute in pairs, since the GCF and LCM of a set can be built one pair at a time.
When the result stops applying
The GCF of two numbers that share no factors is 1, so they are coprime, and their LCM is their product. Large numbers are handled quickly by the Euclidean algorithm, though prime factorization is slower. Negative numbers are treated by absolute value. The tool handles two numbers at a time.
What to compare it with
Reduce fractions on the fraction simplifier, add them on the fraction calculator, and see the primes behind the factors on the prime factorization page. The ratio simplifier and modulo calculator use the same ideas. The proportion calculator scales quantities.
People also ask
Frequently asked questions
What is the difference between GCF and LCM?
The GCF is the largest number that divides both, while the LCM is the smallest number that both divide into.
How are GCF and LCM related?
For two numbers, GCF times LCM equals the product of the numbers, so the LCM is their product divided by the GCF.
Where do I use the LCM?
To find common denominators when adding fractions and to work out when repeating events will coincide.