Home/Math/LCM & GCF Calculator
Math

LCM & GCF Calculator

a
b
About this tool

Find the Least Common Multiple and Greatest Common Factor

The GCF (Greatest Common Factor), also called GCD (Greatest Common Divisor), is the largest number that divides evenly into both inputs. The LCM (Least Common Multiple) is the smallest number that is a multiple of both inputs.

These two values are connected by a simple relationship: GCF × LCM = a × b. This calculator uses the Euclidean algorithm — the most efficient method — to find the GCF, then derives LCM from it.

Common uses:

  • GCF — simplifying fractions, dividing quantities into equal groups
  • LCM — adding fractions with different denominators, finding common schedules

Example

Find GCF and LCM of 36 and 48:

Euclidean algorithm: 48 mod 36 = 12, 36 mod 12 = 0 → GCF = 12

LCM = (36 × 48) ÷ 12 = 1728 ÷ 12 = 144

Verify: 144 ÷ 36 = 4 ✓   144 ÷ 48 = 3 ✓

FAQ

Frequently Asked Questions

What is the GCF (Greatest Common Factor)?

The GCF is the largest positive integer that divides evenly into two or more numbers with no remainder. For example, the GCF of 12 and 18 is 6, because 6 is the largest number that goes into both 12 (12÷6=2) and 18 (18÷6=3).

What is the LCM (Least Common Multiple)?

The LCM is the smallest positive integer that is divisible by both numbers. For example, the LCM of 4 and 6 is 12, because 12 is the smallest number that appears in both the multiples of 4 (4, 8, 12…) and multiples of 6 (6, 12…).

What is the Euclidean algorithm?

The Euclidean algorithm finds the GCF efficiently by repeatedly dividing and taking remainders. For GCF(48, 36): 48 mod 36 = 12, then 36 mod 12 = 0, so GCF = 12. It's one of the oldest algorithms in mathematics, dating back to Euclid around 300 BC.

How do GCF and LCM relate to each other?

They're connected by the formula: GCF(a, b) × LCM(a, b) = a × b. So if you know any three of these four values, you can find the fourth. This relationship makes computing LCM from GCF very efficient.

When do you need LCM in real life?

LCM is used when adding or subtracting fractions with different denominators (you need a common denominator, ideally the LCM). It's also used in scheduling problems — if event A repeats every 4 days and event B every 6 days, they next coincide in LCM(4, 6) = 12 days.

When do you use GCF in real life?

GCF is used to simplify fractions — divide numerator and denominator by their GCF. It's also useful when splitting things into equal groups: if you have 24 apples and 36 oranges and want to make identical bags, each bag gets GCF(24,36)=12 of each, making 2 apples and 3 oranges per bag.

What if the GCF of two numbers is 1?

If GCF(a, b) = 1, the numbers are called coprime or relatively prime. Their LCM equals their product. For example, GCF(7, 9) = 1, so LCM(7, 9) = 63. This is common with consecutive integers or prime numbers.

Can LCM and GCF be calculated for more than two numbers?

Yes. For three or more numbers, apply the operation pairwise. GCF(a, b, c) = GCF(GCF(a, b), c). LCM(a, b, c) = LCM(LCM(a, b), c).

What is the GCF of a number and itself?

GCF(n, n) = n. The LCM(n, n) = n too. And GCF(n, 1) = 1 for any n, while LCM(n, 1) = n.

How is LCM used in fraction addition?

To add 1/4 + 1/6, find LCM(4, 6) = 12. Convert both: 3/12 + 2/12 = 5/12. Using the LCM as the common denominator ensures the result is already in the simplest form relative to the denominator.