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

For parents and teachers ↓

What the calculator shows

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.

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

Where GCF and LCM are used

GCF and LCM by grade

GradeWhat children findStandard
Grade 4All factor pairs of a number to 100, and whether it is prime or composite4.OA.B.4
Grade 6The GCF of two numbers to 100 and the LCM of two numbers to 126.NS.B.4
Grade 7 and upPrime 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

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.