GCF Calculator
Find the greatest common factor and least common multiple of two or more whole numbers, with each number's prime factorization, the full list of factors and a prime check.
GCF calculator and LCM calculator
Prime factorization
All factors of the first number
How to find the GCF
The greatest common factor (also called the greatest common divisor, GCD, or highest common factor, HCF) is the largest number that divides all of them. Two ways:
- Prime factors: 12 = 2² × 3, 18 = 2 × 3², 30 = 2 × 3 × 5. Take each prime that appears in all of them at its lowest power: 2 × 3 = 6.
- Euclid's algorithm: GCF(a, b) = GCF(b, a mod b). GCF(48, 18): 48 mod 18 = 12, 18 mod 12 = 6, 12 mod 6 = 0, so 6.
LCM calculator: least common multiple
The least common multiple calculator finds the smallest number that all of them divide into. Take every prime at its highest power: 2² × 3² × 5 = 180 for 12, 18 and 30. For two numbers, LCM(a, b) = a × b ÷ GCF(a, b): LCM(12, 18) = 216 ÷ 6 = 36. The LCM is the least common denominator when adding fractions.
Factoring calculator: prime factorization and factors
Prime factorization writes a number as a product of primes, which is unique for every whole number above 1 (the fundamental theorem of arithmetic): 360 = 2³ × 3² × 5. Multiply one more than each exponent to count all factors: 360 has (3 + 1)(2 + 1)(1 + 1) = 24 factors. To factor a quadratic like x² − 5x + 6, use the quadratic formula calculator.
Common questions
What is the GCF of 12, 18 and 30?
6.
What is the LCM of 12, 18 and 30?
180.
How do I find the LCM of two numbers?
Multiply them and divide by their GCF: LCM(12, 18) = 216 ÷ 6 = 36.
What is the prime factorization of 360?
2³ × 3² × 5.
Is GCF the same as GCD and HCF?
Yes: greatest common factor, greatest common divisor and highest common factor are the same thing.
Sources
Related
- Decimal to fraction calculator
- Proportion calculator
- Quadratic formula calculator
- Scientific calculator
General information, not financial, tax or legal advice. Check important numbers with the official source before acting on them.