GCF / LCM Calculator
Find the greatest common factor and least common multiple of two integers, with prime factorisation steps and the 24 and 36 worked example.
Results
GCF (GCD)
- LCM
- 72
You might also need
Educational estimates · not financial advice · free, no signup
Formula / how it works
GCF(a, b) is the largest integer dividing both. LCM(a, b) = |a × b| ÷ GCF(a, b). Equivalently, use prime factorisation: GCF takes the lowest powers, LCM takes the highest.
Detailed guide
What it is, how to use it, how to read the numbers, common mistakes, a worked example, formulas, and FAQs.
What this calculator is
The greatest common factor, or greatest common divisor, is the largest whole number that divides two numbers without a remainder. The least common multiple is the smallest positive number that both divide into. They are the basis of simplifying fractions, finding common denominators and solving scheduling problems. This calculator returns both values for two integers. The two are linked: the product of the GCF and LCM equals the product of the numbers. It is limited to two inputs; for three or more, apply the calculation pairwise.
When to use / who it helps
- You are simplifying a fraction.
- You need a common denominator to add or subtract fractions.
- You are solving a problem about repeating events, such as two schedules that align.
- You are dividing items into the largest equal groups.
- You are checking homework on factors and multiples.
How to use
Steps
- Enter the first integer.
- Enter the second integer.
- Read the GCF.
- Read the LCM.
- Use the GCF to reduce a fraction a/b by dividing both parts.
- For three numbers, find the GCF or LCM of two and combine with the third.
How to interpret results
- A GCF of 1 means the numbers are coprime.
- The LCM is at least as large as the larger number.
- GCF × LCM equals the product of the two numbers.
- If one number divides the other, the GCF is the smaller and the LCM is the larger.
- Common denominators for fractions come from the LCM.
Common mistakes & gotchas
- Confusing the GCF with the LCM.
- Entering decimals.
- Using the product of the numbers as the LCM when they share factors.
- Including zero as an input.
- Forgetting to apply the pairwise method for three numbers.
Worked example
Worked example — 24 and 36
- Prime factors: 24 = 2³ × 3 and 36 = 2² × 3².
- GCF takes the lowest powers: 2² × 3 = 12.
- LCM takes the highest powers: 2³ × 3² = 72.
- Check: 12 × 72 = 864 = 24 × 36. Also 1/24 + 1/36 = 3/72 + 2/72 = 5/72.
Result: GCF = 12 and LCM = 72.
To load the form's own demo values, tap Try example above the Calculate button.
How to calculate / formula
GCF(a, b) is the largest integer dividing both. LCM(a, b) = |a × b| ÷ GCF(a, b). Equivalently, use prime factorisation: GCF takes the lowest powers, LCM takes the highest.
Frequently asked questions
What is the difference between GCF and LCM?
The GCF is the largest common divisor; the LCM is the smallest common multiple.
How do I simplify a fraction with the GCF?
Divide the numerator and denominator by their GCF.
How do I find the LCM from the GCF?
Multiply the numbers, then divide by their GCF.
What is GCD?
Another name for the GCF.
What if the numbers share no factors?
The GCF is 1 and the LCM is their product.
Does it work for more than two numbers?
Apply it to two at a time.