GCF & LCM: worked example
| First number | 24 |
|---|---|
| Second number | 36 |
| Greatest common factor | 12 |
| Least common multiple | 72 |
GCF & LCM: formula
Wolfram MathWorld: GreatestCommonDivisor · Least Common Multiple: Wolfram MathWorld
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.
GCF & LCM: changing First number
| First number | Greatest common factor | Least common multiple |
|---|---|---|
| 19 | 1 | 684 |
| 22 | 2 | 396 |
| 24 (example) | 12 | 72 |
| 26 | 2 | 468 |
| 29 | 1 | 1,044 |
GCF & LCM: compare input ranges
| Input | Tested from | To | Greatest common factor: low input | Greatest common factor: high input | Swing |
|---|---|---|---|---|---|
| First number | 22 | 26 | 2 | 2 | 0 |
| Second number | 32 | 40 | 8 | 8 | 0 |
GCF & LCM: individual input comparisons
| Input | Value | Greatest common factor | Least common multiple |
|---|---|---|---|
| First number | 19 | 1 | 684 |
| 22 | 2 | 396 | |
| 24 | 12 | 72 | |
| 26 | 2 | 468 | |
| 29 | 1 | 1,044 | |
| Second number | 29 | 1 | 696 |
| 32 | 8 | 96 | |
| 36 | 12 | 72 | |
| 40 | 8 | 120 | |
| 43 | 1 | 1,032 |
GCF & LCM: combined input changes
| 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 |
GCF & LCM: values and definitions
| Quantity and definition | Value used |
|---|---|
| First number | 24 |
| Second number | 36 |
| Greatest common factor | 12 |
| Least common multiple | 72 |
Common error: Using LCM when a fraction 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.
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.
Number Theory & Precision calculators: Prime Factorization Calculator, Scientific Notation Calculator, Percent Error Calculator, Number Base Converter Calculator, Factorial Calculator, Modulo Calculator.
GCF and LCM solve two different practical problems that happen to use related math. GCF is what 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.
Identify which task you're solving, simplifying a fraction calls for GCF, finding a common denominator calls for LCM, before reading which of the two numbers applies.
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.
GCF & LCM Calculator: quantities and terminology
What is the difference between GCF and LCM?
For positive integers, the GCF divides both. Choose the largest such divisor. The LCM is a multiple of both integers.
Choose the smallest positive one when both inputs are nonzero; a shared divisor and a shared multiple answer different questions.
How are GCF and LCM related?
For positive integers, GCF × LCM equals their product. Divide that product by the GCF to obtain the LCM. Keep the zero-input convention separate, since dividing by a zero GCF cannot establish a result.
Where do I use the LCM?
The LCM supplies a common denominator for adding fractions. It also identifies when repeating events coincide, provided their periods use matching units and both cycles start together. A timing offset changes that scheduling question.