Embed this tool on your site
About this tool
The greatest common factor (GCF), also called the greatest common divisor (GCD) or highest common factor (HCF), is the largest whole number that divides every number in a list with no remainder. For 12, 18 and 30 the GCF is 6. Enter two or more whole numbers separated by commas or spaces and this GCF calculator gives the answer as you type, along with the least common multiple (LCM) of the same numbers. It shows two kinds of working. The Euclidean algorithm lists each division step, a = q × b + r, until the remainder is zero; for three or more numbers it runs pair by pair. The prime factorization method keeps only the primes every number shares, at their lowest power. If the GCF is 1 the numbers are relatively prime, and the tool says so. Up to 50 numbers from 1 to one trillion are supported, with exact integer arithmetic in your browser.
Why use it
Two methods shown: Euclidean algorithm divisions and prime factorization, so you can follow whichever your class uses.
Works on long lists: up to 50 numbers, reduced pair by pair with each step listed.
Spots coprime numbers: a GCF of 1 is flagged as relatively prime.
Exact for large values: integer arithmetic keeps numbers up to one trillion exact.
Runs in your browser with nothing uploaded.
How to use
- Type two or more whole numbers separated by commas or spaces, for example 84, 36.
- Read the greatest common factor in the result card; the LCM appears beside it.
- Follow the Euclidean algorithm steps to see how repeated division reaches the GCF.
- Compare with the prime factorization method, which multiplies the shared primes.
- Press Copy result to copy the GCF.
When it helps
- Simplifying a fraction such as 84/36 by dividing the top and bottom by their GCF.
- Checking factoring homework, including Euclidean algorithm questions.
- Splitting items into the largest equal groups with nothing left over.
- Finding the largest square tile that fits a rectangle exactly.
Examples
01Two numbers, Euclidean algorithm
Expected resultGCF = 12 (84 = 2 × 36 + 12; 36 = 3 × 12 + 0); LCM = 252
Expected resultGCF = 6 (2 × 3); LCM = 180
Expected resultGCF = 21 (1071 = 2 × 462 + 147; 462 = 3 × 147 + 21; 147 = 7 × 21 + 0)
Tips
- To simplify a fraction fully, divide the numerator and denominator by their GCF in one step.
- The GCF can never be larger than the smallest number in the list.
- If the smallest number divides all the others, it is the GCF.
Frequently Asked Questions
What is the greatest common factor?⌄
The GCF of a set of whole numbers is the largest number that divides each of them exactly. The factors of 12 are 1, 2, 3, 4, 6 and 12 and the factors of 18 are 1, 2, 3, 6, 9 and 18, so the GCF of 12 and 18 is 6.
Is the GCF the same as the GCD and HCF?⌄
Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same number.
How does the Euclidean algorithm work?⌄
Divide the larger number by the smaller and keep the remainder. Replace the larger number with the smaller and the smaller with the remainder, and repeat until the remainder is 0. The last non-zero remainder is the GCF. For 84 and 36: 84 = 2 × 36 + 12, then 36 = 3 × 12 + 0, so the GCF is 12.
How do you find the GCF with prime factorization?⌄
Factor each number into primes and multiply only the primes that appear in every number, each at its lowest power. 24 = 2³ × 3 and 36 = 2² × 3², so the GCF is 2² × 3 = 12.
What does a GCF of 1 mean?⌄
The numbers share no factor other than 1, so they are called relatively prime or coprime. For example 8, 9 and 21 have a GCF of 1 even though 9 and 21 share the factor 3.
How do I find the GCF of three numbers?⌄
Find the GCF of the first two numbers, then the GCF of that answer and the third number. The calculator shows a Euclidean algorithm block for each pair in turn.
What numbers are accepted?⌄
Enter 2 to 50 whole numbers from 1 to one trillion. Zero, negative numbers and decimals are not accepted.
Glossary
- Factor
- A whole number that divides another exactly. 6 is a factor of 18.
- Euclidean algorithm
- A method for finding the GCF by repeated division with remainder until the remainder is zero.
- Relatively prime
- Numbers whose greatest common factor is 1, also called coprime.
A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.
Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.
✳
✳
✓ Free to use✓ No sign-up✓ 500+ possibilities