GCF and LCM calculator
Type two or three numbers to find their GCF and LCM with every step, or one number to see all its factors and its factor tree.
🧒 Kids: type 12, 18 and tap Show the steps. Can you find the GCF on paper before you look?
Factor, GCF and LCM calculator
What the calculator shows
- One number: every factor, the factor pairs, prime or composite, the prime factorization with exponents, a factor tree and the first 10 multiples.
- Two or three numbers: the GCF and LCM, worked out by listing factors, listing multiples and prime factors.
- Two numbers: the ladder method too, and the check that GCF × LCM equals the two numbers multiplied.
Use it to check homework, not to replace it. Ask your child to solve the problem first, then compare their working step by step.
Ready-made examples to try
Each link opens the calculator with the numbers filled in.
- All the factors of 24: 8 factors and 4 factor pairs
- Is 97 prime?: Only two factors
- Prime factorization of 72: 2³ × 3², with a factor tree
- GCF and LCM of 12 and 18: GCF 6, LCM 36
- GCF of 24 and 36: A ladder with three steps
- LCM of 6 and 8: 24, not 48
- GCF of 9 and 14: Relatively prime numbers
- GCF and LCM of 8, 12 and 20: Three numbers
- GCF and LCM of 60 and 84: Bigger numbers
Three ways to find the GCF
List the factors. Write every factor of each number and circle the ones in both lists. The greatest circled number is the GCF. For 12 and 18 the common factors are 1, 2, 3 and 6, so the GCF is 6.
Use prime factors. 12 = 2² × 3 and 18 = 2 × 3². Both share one 2 and one 3, so the GCF is 2 × 3 = 6. This is the fastest way for big numbers.
Use the ladder. Divide both numbers by a prime they share, and keep going until they share none. Multiply the primes down the side to get the GCF. See the greatest common factor lesson.
Three ways to find the LCM
List the multiples. Count in 6s and 8s until a number appears in both lists: 6, 12, 18, 24 and 8, 16, 24. The LCM is 24.
Use prime factors. Take every prime with its largest power. 6 = 2 × 3 and 8 = 2³, so the LCM is 2³ × 3 = 24.
Use the ladder. Multiply the GCF by the numbers left on the bottom row. See the least common multiple lesson.
Reading a factor tree
A factor tree splits a number into two factors, then splits again until every branch ends in a prime. The calculator splits off the smallest prime each time and circles the primes. For 72 the circled primes are 2, 2, 2, 3 and 3, so 72 = 2³ × 3².
Every whole number above 1 has only one prime factorization. Two children can draw different trees for 72 and still circle the same primes.
Common mistakes the steps catch
- Multiplying to get the LCM: 6 × 8 = 48 is a common multiple, but 24 is the least one.
- Stopping at a common factor: 2 divides 24 and 36, but the greatest common factor is 12.
- Leaving a composite at the end of a branch: 72 = 2 × 4 × 9 is not finished. Every circled number must be prime.
- Mixing up the powers: the GCF takes the smallest power of each shared prime; the LCM takes the largest.
Where GCF and LCM are used
- Simplifying fractions: divide the top and bottom by the GCF. 18/24 ÷ 6 = 3/4. See simplifying fractions.
- Adding fractions: the LCM of the denominators is the least common denominator. For 1/6 + 3/8 use 24.
- Word problems: the GCF splits things into the largest equal groups; the LCM finds when things happen together again.
GCF and LCM by grade
| Grade | What children find | Standard |
|---|---|---|
| Grade 4 | All factor pairs of a number to 100, and whether it is prime or composite | 4.OA.B.4 |
| Grade 6 | The GCF of two numbers to 100 and the LCM of two numbers to 12 | 6.NS.B.4 |
| Grade 7 and up | Prime factorization with exponents, and LCDs for algebraic fractions | — |
In India, NCERT class 6 chapter 5, Prime Time, covers common factors, common multiples and prime factorization. Class 10 returns to HCF and LCM in the chapter on real numbers.
For teachers
Project the calculator and ask the class to predict the GCF before you tap Show the steps.
To set a homework check, share a link with the numbers filled in, like ?n=24,36. For practice questions, send children to the factors and multiples practice. Nothing is stored and no login is needed.
More factors and multiples help
- Factors and multiples practice: 10 questions on any of 13 skills, marked as you go.
- GCF and LCM calculator: factors, factor trees, GCF and LCM with every step.
- Lessons: factors and multiples · prime numbers · greatest common factor · least common multiple
- Test yourself: factors and multiples quiz · factor games · 6 levels · grade 4 · grade 6
- Concepts: composite numbers · prime factorization · common factors · GCF and LCM word problems
- Worksheets: factors and multiples · prime numbers · divisibility rules · GCF · LCM
- Where it is used: simplifying fractions · adding fractions · ratios
Back to factors and multiples for kids · 4th grade math · 6th grade math
Last reviewed
Questions parents ask
How do I use the GCF and LCM calculator?
Type two or three whole numbers, such as 12, 18, and tap Show the steps. The calculator finds the GCF and LCM by listing, by prime factors and by the ladder method.
Can it find all the factors of a number?
Yes. Type one number, like 48. You get every factor, the factor pairs, whether it is prime or composite, its prime factorization with a factor tree and its first 10 multiples.
How do you find the GCF and LCM using prime factorization?
Write each number as a product of primes. The GCF uses the primes they share, with the smallest power. The LCM uses every prime, with the largest power. For 12 = 2² × 3 and 18 = 2 × 3², GCF = 2 × 3 = 6 and LCM = 2² × 3² = 36.
Why does GCF × LCM equal the two numbers multiplied?
Each prime factor of the two numbers ends up in either the GCF or the LCM, exactly once. So 6 × 36 = 216 = 12 × 18. It only works for two numbers, not three.
What if the GCF is 1?
Then the numbers are relatively prime, or coprime, like 9 and 14. Their LCM is simply their product, 126.
Is it OK for my child to use a GCF calculator?
Yes, for checking. Ask your child to work the problem on paper first, then compare each step with the calculator’s.