GCF and LCM are two sides of the same coin. The GCF tells you the largest equal groups you can split items into; the LCM tells you when repeating events coincide and gives common denominators.
How to use the GCF and LCM Calculator
- Type the numbers separated by commas, spaces or new lines.
- Read the result – it updates as you type.
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
Each number is written as a product of primes. The GCF keeps only the primes they all share, at the smallest power; the LCM keeps every prime that appears, at the largest power.
Formula
GCF: shared primes at their lowest powers
LCM: all primes at their highest powers
For two numbers: GCF × LCM = a × b
Worked example
Inputs — Numbers (2 to 15 whole numbers): 12, 18.
Results — GCF = 6; LCM = 36; Prime factorisations = 12 = 2² × 3
18 = 2 × 3²
Shared primes at their lowest power: 2 × 3 = 6
Every prime at its highest power: 2² × 3² = 36; Check = GCF × LCM = 216 = 12 × 18.
Key terms
- Least common multiple (LCM)
- The smallest positive number that is a multiple of each number.
Frequently asked questions
What is the difference between GCF and LCM?
GCF is the biggest number that divides them all; LCM is the smallest number they all divide.
What are the GCF and LCM of 12 and 18?
GCF 6, LCM 36.
Why is GCF × LCM = a × b?
Each prime's lowest and highest powers together use up all of a and b.
Does that hold for three numbers?
No – only for two numbers.