Math
GCF Calculator
Enter two or more whole numbers to get their greatest common factor along with every method your class might use: listing all factors and picking the largest shared one, building a prime-factor table and taking the lowest power of each shared prime, and running Euclid's algorithm with each division written out.
Use the GCF to reduce fractions, simplify ratios, and factor expressions.
Two or more positive whole numbers separated by commas or spaces. Up to 12 numbers, each up to 1,000,000,000,000.
Try an example
Result
GCF
—
- LCM (for comparison)
- —
- GCF as prime factors
- —
- Numbers divided by the GCF
- —
Student quick launch
Grade planning, algebra checks, and formulas students reach for most.
Study path
Use this calculator with
Follow these when you want the formula behind the answer, a short lesson, or nearby tools in the same topic.
What the gcf calculator solves
Enter two or more whole numbers to get their The largest number that divides evenly into every number in a set. along with every method your class might use: listing all factors and picking the largest shared one, building a A whole number above 1 whose only factors are 1 and itself.-factor table and taking the lowest power of each shared prime, and running Euclid's algorithm with each division written out. Use the GCF to reduce fractions, simplify ratios, and factor expressions.
Formula
How to use it
- Type two or more whole numbers separated by commas.
- Read the GCF and the numbers divided by it (useful for reducing fractions and ratios).
- Pick the method in the steps that matches your class: listing, prime factors, or Euclid's algorithm.
How to read the answer
The GCF is the largest number that divides every input with no remainder, so it can never be larger than the smallest input. A GCF of 1 means the numbers are coprime. Dividing each number by the GCF gives the simplest version of a fraction or ratio, which is the most common reason to compute it.
Common mistakes and edge cases
- Taking the highest power of each prime; that gives the LCM. The GCF uses the lowest shared power.
- Including a prime that appears in only some of the numbers; it must appear in all of them.
- Stopping Euclid's algorithm one step early; the answer is the last nonzero remainder, not the last quotient.
- Expecting the GCF to be larger than the smallest input. It cannot be.
- Treating 0 as an input: gcf(0, n) = n, but 0 is not accepted here because it has no factor list.
Worked examples
GCF of 48 and 18
Euclid: 48 = 18 × 2 + 12, 18 = 12 × 1 + 6, 12 = 6 × 2 + 0.
GCF
6
GCF of three numbers
gcf(12, 18, 30) = 6.
GCF
6
Coprime numbers
35 and 18 share no factor.
GCF
1
One divides the other
gcf(8, 24) = 8.
GCF
8
Reduce 84/126
The GCF 42 reduces it to 2/3.
GCF
42
Large numbers
Euclid handles 12-digit inputs instantly.
GCF
3
Single number
Needs at least two.
GCF
Error
Frequently asked questions
What is the GCF of 48 and 18?+
6. The factors of 18 are 1, 2, 3, 6, 9, 18; of these, 6 is the largest that also divides 48.
Is GCF the same as GCD and HCF?+
Yes. Greatest common factor, greatest common divisor, and highest common factor are three names for the same number.
How does Euclid's algorithm work?+
Divide the larger number by the smaller, then divide the previous divisor by the remainder, and repeat until the remainder is 0. The last nonzero remainder is the GCF: 48 = 18 × 2 + 12, 18 = 12 × 1 + 6, 12 = 6 × 2 + 0, so gcf = 6.
How do I find the GCF of three or more numbers?+
Find the GCF of two of them, then the GCF of that result with the next number, and so on. Or use the prime-factor table and keep only primes that appear in every number.
What does a GCF of 1 mean?+
The numbers are relatively prime or coprime: they share no common factor except 1. A fraction whose numerator and denominator have GCF 1 is already in lowest terms.
How is the GCF used to simplify fractions?+
Divide the numerator and denominator by their GCF. For 84/126 the GCF is 42, so 84/126 = 2/3.
About this calculator
- Written by
- mathcheck editorial team
- Last reviewed
- September 4, 2026
Method
- Uses the values entered by the user and stable formulas documented on the page.
Related calculators
LCM Calculator
Find the least common multiple (LCM) of any list of whole numbers with three worked methods: listing multiples, the prime-factorization exponent table, and lcm(a, b) = a × b ÷ gcf(a, b) using Euclid's algorithm.
GCF and LCM Calculator
Find the greatest common factor and least common multiple for a list of positive integers with factor steps.
Fraction Calculator
Add, subtract, multiply, divide, simplify, compare, or convert decimals to fractions with steps and visual fraction bars.
Prime Factorization Calculator
Factor a positive integer into primes and show the factor tree style division steps.
Factor Calculator
Find all factors of a whole number, the factor pairs, how many divisors it has and their sum, the prime factorization, and whether the number is prime, perfect, abundant, or deficient.
Ratio Calculator
Simplify ratios, compare two quantities, and find unit rates with clear proportional reasoning steps.
Last updated: September 4, 2026