GCF Calculator (Greatest Common Factor)
Greatest common factor (GCD, HCF) of two or more numbers, with steps.
The GCF is the largest number that divides all the numbers evenly. GCF(24, 36) = 12: 24 = 2³ × 3 and 36 = 2² × 3², so the shared factors are 2² × 3 = 12.
Free, runs in your browser. Nothing you enter is uploaded.
How to use it
- Enter two or more whole numbers separated by commas.
- Read the GCF and the LCM.
- Check the prime factorization table to see the steps.
What you enter
- Two or more whole numbers
What you get
- Greatest common factor
- Least common multiple
- Prime factorizations
Formula
GCF = product of shared primes at their lowest powers | Euclid: gcd(a, b) = gcd(b, a mod b)
Worked example
Input: 24, 36
Result: GCF = 12
12 is the largest number that divides both; 24/36 simplifies to 2/3.
Questions
How do you find the greatest common factor?
Write each number as a product of primes and multiply the primes they share, using the lowest power of each. Or use Euclid's algorithm: repeatedly replace the larger number by the remainder until it is zero.
Are GCF, GCD and HCF the same?
Yes. They are three names for the same number.
What is the GCF of two prime numbers?
1, unless they are the same prime. Numbers with a GCF of 1 are called coprime.
How are GCF and LCM related?
For two numbers, GCF × LCM = a × b. GCF(24, 36) × LCM(24, 36) = 12 × 72 = 864 = 24 × 36.
Limitations
- Whole numbers only.
References
- Euclid, c. 300 BC; see Knuth DE, The Art of Computer Programming Vol. 2, §4.5.2.
More STEM & Mathematics
- Scientific Calculator Online
- Fraction Calculator (Add, Subtract, Multiply, Divide)
- Ratio Calculator
- Logarithm Calculator (log, ln, log2, any base)
- Percent Change Calculator
- Euclidean Distance Calculator
- LCM Calculator (Least Common Multiple)
- Proportion Calculator
- Radians to Degrees Converter
All free tools · By Dr. Zubair Khalid, DVM, MS, PhD.