
The Fast Answer and the Method Behind It
The greatest common factor shows up everywhere: simplifying fractions, reducing ratios, splitting supplies into equal groups, and factoring algebra problems. Most GCF calculators give you the number and move on, which is fine until a teacher asks to “show your work” — or until you need the least common multiple for the next step of the same problem and have to start over on another page.
Looking for the GCD Calculator? GCF and GCD are the same concept with different names.
This free GCF calculator handles both. Enter two or three whole numbers and it finds the GCF using the Euclidean algorithm — the 2,300-year-old division method that is far faster than listing factors — showing every division step with your numbers in place. As a bonus, it computes the LCM from the same work, so fraction problems that need both are done in one visit.
Euclidean algorithm · 2 or 3 numbers · LCM bonus
Please enter at least two positive whole numbers (1 or greater).
Show your work

How to Use This Calculator
- Enter the first number. Any positive whole number, for example 48.
- Enter the second number. For example 18 — the GCF of 48 and 18 is 6.
- Optionally add a third number. Leave it blank for two numbers. With three numbers, the calculator finds the GCF of the first two, then folds in the third.
- Click Find GCF. The greatest common factor appears at the top, with the least common multiple shown as a bonus.
- Open “Show your work”. Expand the panel to see each Euclidean division step (“48 = 18 × 2 + 12”, and so on) plus the LCM computation.
What Is the Greatest Common Factor?
The greatest common factor (GCF) — also called the greatest common divisor (GCD) or highest common factor (HCF) — is the largest whole number that divides evenly into every number in a set. The factors of 48 are 1, 2, 3, 4, 6, 8, 12, 16, 24, 48; the factors of 18 are 1, 2, 3, 6, 9, 18. The common ones are 1, 2, 3, and 6 — and the greatest is 6.
Listing factors works, but it gets tedious fast with large numbers. The calculator instead uses the Euclidean algorithm: divide the larger number by the smaller, then replace the pair with the divisor and the remainder, and repeat until a remainder of 0 appears. The last non-zero remainder is the GCF. For 48 and 18 that is just three divisions: 48 = 18 × 2 + 12, then 18 = 12 × 1 + 6, then 12 = 6 × 2 + 0 → GCF = 6.
The natural partner of the GCF is the least common multiple (LCM) — the smallest number that is a multiple of every input. The two are linked by a neat identity: LCM(a, b) = |a × b| / GCF(a, b). So LCM(48, 18) = 864 / 6 = 144. The calculator applies this automatically, which is exactly what you need when adding or subtracting fractions with different denominators.
The Formula (With a Worked Example)
Three numbers: GCF(a, b, c) = GCF(GCF(a, b), c)
LCM(a, b) = |a × b| ÷ GCF(a, b)
Worked example. Find GCF(48, 18) and LCM(48, 18):
- 48 ÷ 18 = 2 remainder 12 → continue with (18, 12).
- 18 ÷ 12 = 1 remainder 6 → continue with (12, 6).
- 12 ÷ 6 = 2 remainder 0 → stop. Last non-zero remainder: GCF = 6.
- Bonus LCM: |48 × 18| ÷ 6 = 864 ÷ 6 = 144.
Three-number example. GCF(48, 18, 30): first GCF(48, 18) = 6, then GCF(6, 30): 30 = 6 × 5 + 0, so the overall GCF = 6 and the LCM folds to 720.
Tips for Working with GCF and LCM
- Trust the algorithm over listing. Writing out every factor of numbers like 1,260 and 3,024 invites mistakes; three or four Euclidean divisions cannot go wrong if each division is right.
- Check a GCF of 1. If the answer is 1, the numbers are coprime — they share no factor at all. That is a valid result, not an error. (13 and 17, for instance, are coprime.)
- Use GCF to simplify fractions fast. Divide the top and bottom of 18/48 by their GCF of 6 and you get 3/8 in one step.
- Use the LCM for fraction arithmetic. To add 5/48 + 7/18, convert both to the common denominator 144: 15/144 + 56/144 = 71/144.
- Fold three numbers pairwise. GCF(48, 18, 30) = GCF(GCF(48, 18), 30) — the calculator does this automatically, but the same trick works on paper for four or more numbers.
- Remember the names are interchangeable. GCF, GCD, and HCF all mean the same thing; textbooks and teachers just pick different favorites.
Related Tools
Finding the GCF by Prime Factorization
The Euclidean algorithm is the fastest route, but prime factorization shows why the answer is what it is — and it is the method most textbooks teach first. Write each number as a product of prime factors, then multiply together the primes the numbers share, each taken at the lower of the two powers.
- Factor both numbers: 48 = 2⁴ × 3 and 60 = 2² × 3 × 5.
- Keep only the shared primes, at their lowest powers: 2² (not 2⁴) and 3.
- Multiply: 2² × 3 = 12 — the GCF of 48 and 60.
Cross-check with Euclid: 60 = 48 × 1 + 12, then 48 = 12 × 4 + 0, so the last non-zero remainder is 12. Same answer, two roads.
The same factorization also hands you the LCM — just flip the rule and take the highest powers: 2⁴ × 3 × 5 = 240, which matches the shortcut 48 × 60 ÷ 12 = 240. Lowest powers shared gives the GCF; highest powers anywhere gives the LCM.
FAQs
How do you find the GCF using the Euclidean algorithm?
Divide the larger number by the smaller and note the remainder. Then repeat with the divisor and the remainder as the new pair. Keep going until a remainder of 0 appears — the last non-zero remainder is the GCF. For 48 and 18: 48 = 18 × 2 + 12, 18 = 12 × 1 + 6, 12 = 6 × 2 + 0, so the GCF is 6. The calculator shows each of these divisions under “Show your work”.
What is the GCF of 48 and 18?
6. The factors of 48 include 6 and the factors of 18 include 6, and no larger number divides both. The Euclidean algorithm confirms it in three divisions: 48 = 18 × 2 + 12, 18 = 12 × 1 + 6, 12 = 6 × 2 + 0.
How do you find the GCF of three numbers?
Find the GCF of the first two numbers, then find the GCF of that result with the third number: GCF(a, b, c) = GCF(GCF(a, b), c). For 48, 18, and 30: GCF(48, 18) = 6, then GCF(6, 30) = 6, so the overall GCF is 6. Enter all three in the calculator and it folds them automatically.
What is the LCM and how is it related to the GCF?
The least common multiple (LCM) is the smallest number that is a multiple of each input. It is linked to the GCF by the identity LCM(a, b) = |a × b| ÷ GCF(a, b) — for 48 and 18, that is 864 ÷ 6 = 144. The calculator computes the LCM as a bonus with every GCF result.
What does it mean if the GCF is 1?
The numbers are coprime — they share no common factor except 1. For example, GCF(13, 17) = 1 because both are prime. A GCF of 1 is a perfectly valid answer, and it tells you a fraction like 13/17 is already in lowest terms.
What is the difference between GCF, GCD, and HCF?
Nothing — greatest common factor, greatest common divisor, and highest common factor are three names for the same concept: the largest whole number dividing each input evenly. American textbooks usually say GCF or GCD; British and South Asian curricula often say HCF.
Can the GCF calculator handle zero or negative numbers?
This calculator accepts positive whole numbers only, since the GCF is defined for those. Mathematically, GCF(0, n) = n and signs do not matter (factors ignore them), but keeping inputs positive avoids ambiguity. If you need the GCF involving zero, use the rule GCF(0, n) = n directly.
How do you find the GCF using prime factorization?
Write each number as a product of primes, then multiply the primes the numbers share, each taken at the lower of the two powers. For 48 = 2⁴ × 3 and 60 = 2² × 3 × 5, the shared primes at their lowest powers are 2² × 3, so the GCF is 12.
Try our quadratic formula calculator with full step-by-step working.