Worked example
Find the GCF and LCM of 24 and 36. Prime factors: 24 = 2³ × 3 and 36 = 2² × 3². The GCF takes each shared prime at its lowest power, 2² × 3 = 12. The LCM takes every prime at its highest power, 2³ × 3² = 72. With Euclid: 36 = 1 × 24 + 12; 24 = 2 × 12 + 0, so the GCF is 12.
Common pairs
| Numbers | GCF | LCM |
|---|---|---|
| 4 and 6 | 2 | 12 |
| 8 and 12 | 4 | 24 |
| 9 and 15 | 3 | 45 |
| 12 and 18 | 6 | 36 |
| 15 and 20 | 5 | 60 |
| 18 and 24 | 6 | 72 |
| 21 and 28 | 7 | 84 |
| 36 and 48 | 12 | 144 |
Using them with fractions
To simplify 24/36, divide the top and bottom by their GCF, 12, to get 2/3. To add 5/24 + 7/36, use the LCM of the denominators, 72: 5/24 = 15/72 and 7/36 = 14/72, so the sum is 29/72. The fraction calculator on this site does both automatically and shows the same steps.
Which method to use
Prime factorization shows why the answer is what it is and suits small numbers and homework that asks for factor trees or ladders. Euclid’s algorithm needs no factoring at all, so it is the way computers do it and the only practical method for very large numbers. Numbers that share no prime factor, such as 8 and 15, are called co-prime: their GCF is 1 and their LCM is simply their product.
Related tools
- Quadratic equation solver
- Prime number checker
- Scientific notation converter
- Long division calculator
- Pythagorean theorem calculator
- Exponent and log calculator
- Matrix calculator
- Fraction calculator
- Scientific calculator
Sources
Checked on November 26, 2026:
- Khan Academy: Factors and multiples
- Euclid, Elements, Book VII, Propositions 1–2 (the algorithm for the greatest common measure)
Frequently asked questions
What is the GCF?
What is the LCM?
How are the GCF and LCM related?
What is Euclid’s algorithm?
Can I use more than two numbers?
Where is the LCM used in real life?
Last updated: 2026-11-26