GCF Calculator (GCD / HCF) & LCM Calculator
Find the greatest common factor and least common multiple of two or more numbers using prime factorization.
The Euclidean algorithm finds the same GCF without prime factorization. For three or more numbers, the calculator reduces the set one pair at a time.
LOCAL TOOL: Your numbers and factorization walkthrough stay in your browser.
GCF, GCD, and HCF mean the same thing.
The greatest common factor (GCF), greatest common divisor (GCD), and highest common factor (HCF) are three names for the largest positive whole number that divides every input evenly. The least common multiple (LCM) is the smallest positive whole number that is a multiple of every input.
For 24 and 36, the GCF/GCD/HCF is 12 and the LCM is 72. Prime factorization shows why: 24 = 2³ × 3 and 36 = 2² × 3². The GCF keeps shared primes with the smallest exponents, while the LCM keeps every prime with the largest exponent needed.
How to find the GCF with the Euclidean algorithm
The Euclidean algorithm repeatedly divides the larger value by the smaller value and carries the remainder forward. For 48 and 18: 48 = 18 × 2 + 12, then 18 = 12 × 1 + 6, then 12 = 6 × 2 + 0. The last nonzero remainder is 6, so the GCF is 6.
This method is especially useful when the numbers are large because it can reach the GCF without listing every prime factor. The calculator shows both methods so you can compare them.
GCF and LCM examples
24 and 36: GCF = 12 and LCM = 72.
48, 64, and 80: GCF = 16 and LCM = 960.
7 and 11: GCF = 1 and LCM = 77. Because the only common factor is 1, the pair is coprime.
12 and 18: GCF = 6 and LCM = 36.
Common GCF, GCD, HCF, and LCM questions
Is GCF the same as GCD and HCF? Yes. Greatest common factor, greatest common divisor, and highest common factor refer to the same number.
Can I find the GCF of more than two numbers? Yes. Enter three or more whole numbers and the calculator finds the factor shared by the entire set.
What does a GCF of 1 mean? It means the full set has no common factor greater than 1. With two numbers, that means they are coprime.
When should I use GCF instead of LCM? Use GCF when splitting or simplifying into the largest equal groups. Use LCM when looking for the first shared multiple, such as a common denominator or repeating schedule.
Related tools: reduce a fraction with the Fraction Simplifier, inspect one number with the Prime Factorization Calculator, work full fraction problems with the Fraction Calculator, or solve equivalent ratios with the Ratio & Proportion Calculator.