The greatest common factor is the largest number that divides all the given numbers. It simplifies fractions (18/24 = 3/4 using GCF 6), splits things into equal groups and appears throughout number theory.
How to use the GCF Calculator: Greatest Common Factor
- 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 factorised into primes and the primes common to all of them are multiplied using their smallest exponents. For two numbers the calculator also shows Euclid’s algorithm, which uses repeated division.
Formula
GCF = product of the shared primes at their lowest powers
Euclid: gcd(a, b) = gcd(b, a mod b)
Worked example
Inputs: Numbers (2 to 15 whole numbers): 12, 18, 30.
Results: GCF = 6; Prime factorisation method = 12 = 2² × 3
18 = 2 × 3²
30 = 2 × 3 × 5
Shared primes at their lowest power: 2 × 3 = 6; LCM (for comparison) = 180; Relatively prime? = No – they share the factor 6.
Key terms
- Greatest common factor (GCF)
- The largest number dividing all the given numbers; also GCD or HCF.
Frequently asked questions
What is the GCF of 12 and 18?
6.
What is the GCF of two primes?
1, because they are relatively prime.
How do I find the GCF of three numbers?
GCF(a, b, c) = GCF(GCF(a, b), c).
How are GCF and LCM related?
For two numbers, GCF × LCM = a × b.