Figuro.net
Blog

LCM & GCF Calculator

Find the least common multiple (LCM) and greatest common factor (GCF) of two or more numbers, with the prime factorization shown for every step.

Enter values and press Calculate to see the result here.

How this is calculated

Each number is broken down into its prime factors. The GCF is the product of the prime factors shared by every number; the LCM is the product of every prime factor needed by any of the numbers, at its highest power.

LCM and GCF explained

The Least Common Multiple (LCM) is the smallest number that all your numbers divide into evenly. The Greatest Common Factor (GCF, also called GCD) is the largest number that divides evenly into all your numbers — they're opposite ends of the same relationship.

Formula

GCF(a, b) = largest number dividing both a and b evenly
LCM(a, b) = (a × b) ÷ GCF(a, b)

Example: for 12 and 18, GCF = 6, so LCM = (12 × 18) ÷ 6 = 36.

Quick reference table

NumbersGCFLCM
4, 6212
12, 18636
12, 18, 306180

Common pitfalls

Tips

Frequently asked questions

What is LCM? LCM stands for Least Common Multiple — the smallest positive number that is a multiple of every number in a given set. The LCM of 4 and 6 is 12.

What is GCF? GCF stands for Greatest Common Factor (also called GCD, Greatest Common Divisor) — the largest number that divides evenly into every number in a given set. The GCF of 12 and 18 is 6.

How do you find the LCM of two numbers? One reliable method: LCM(a, b) = (a × b) ÷ GCF(a, b). For 4 and 6, GCF is 2, so LCM = (4 × 6) ÷ 2 = 12.

How do you find the GCF using prime factorization? Break each number into its prime factors, then multiply together the prime factors common to all the numbers. For 12 (2×2×3) and 18 (2×3×3), the shared factors are 2 and 3, so the GCF is 6.

Why do I need LCM when adding fractions? To add fractions with different denominators, you first convert them to a common denominator — using the LCM of the denominators keeps the numbers as small as possible.

What is the difference between GCF and GCD? GCF (Greatest Common Factor) and GCD (Greatest Common Divisor) are two names for exactly the same value — different textbooks and regions prefer one term or the other.

Worked examples

Example 1 — Two numbers: 4 and 6 → GCF = 2, LCM = 12.

Example 2 — Adding fractions: to add 1/12 + 1/18, find the LCM of 12 and 18 (which is 36) as the common denominator: 3/36 + 2/36 = 5/36.

Example 3 — Three numbers: 12, 18, and 30 → GCF = 6, LCM = 180.

← Browse all 62 calculators