GCF Calculator
Find the greatest common factor (GCF) of two or more numbers — and the least common multiple (LCM) — with the prime factors shown for each number.
How to find the greatest common factor
The greatest common factor (GCF) — also called the greatest common divisor — is the largest whole number that divides evenly into every number in a set. One reliable way to find it is prime factorization: break each number into its prime factors, then multiply the factors they all share. Enter your numbers above and the calculator shows the GCF, the least common multiple (LCM) and each number’s factorization.
GCF(24, 36) → 24 = 2³·3, 36 = 2²·3² → shared 2²·3 = 12
For example, the common factors of 12 and 18 are 1, 2, 3 and 6, so the GCF is 6. The GCF is what you use to reduce a fraction to lowest terms or split things into equal groups.
GCF vs. LCM
| Numbers | GCF | LCM |
|---|---|---|
| 4, 6 | 2 | 12 |
| 12, 18 | 6 | 36 |
| 8, 12, 20 | 4 | 120 |
The GCF is the largest number they all divide by; the LCM is the smallest number they all divide into. Need to simplify a ratio next? Try the proportion calculator.
Frequently asked questions
What is the greatest common factor?
The greatest common factor (GCF), also called the greatest common divisor, is the largest whole number that divides into all the given numbers evenly. For 12 and 18, the common factors are 1, 2, 3 and 6, so the GCF is 6. The calculator finds it for any list of numbers.
How do I find the GCF?
List the prime factors of each number, then multiply the factors they share. For 24 (2³·3) and 36 (2²·3²) the shared factors are 2²·3 = 12. The calculator shows each number’s prime factorization alongside the GCF so you can follow the working.
What is the difference between GCF and LCM?
The GCF is the largest number that divides into them all; the least common multiple (LCM) is the smallest number they all divide into. For 4 and 6, the GCF is 2 and the LCM is 12. The calculator gives both at once.