GCF Calculator (Greatest Common Factor)
Enter two or more whole numbers to find the largest number that divides all of them. The steps are shown for two numbers.
Result
48 = 2⁴ × 3 180 = 2² × 3² × 5
180 = 3 × 48 + 36 48 = 1 × 36 + 12 36 = 3 × 12 + 0
- Least common multiple (LCM)
- 720
- Numbers entered
- 2
Formula
- Euclidean algorithm: gcf(a, b) = gcf(b, a mod b), until the remainder is 0
- lcm(a, b) = |a × b| ÷ gcf(a, b)
- GCF uses the lowest power of each shared prime, LCM uses the highest power of every prime
How the GCF Calculator works
The greatest common factor, also called the greatest common divisor or highest common factor, is the largest whole number that divides every number in a set without a remainder.
The Euclidean algorithm finds it quickly. Divide the larger number by the smaller, then replace the larger with the smaller and the smaller with the remainder. Repeat until the remainder is zero. The last non-zero remainder is the answer.
Worked example
For 48 and 180: 180 = 3 × 48 + 36, then 48 = 1 × 36 + 12, then 36 = 3 × 12 + 0. The GCF is 12. By primes, 48 = 2⁴ × 3 and 180 = 2² × 3² × 5, which share 2² × 3 = 12.
Frequently asked questions
Is GCF the same as GCD?
Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same number.
What is the GCF used for?
Mainly for simplifying fractions and ratios. Dividing the numerator and denominator by their GCF gives the fraction in lowest terms.
Related calculators
- LCM Calculator (Least Common Multiple)Find the least common multiple of two or more numbers, with prime factorizations. Also gives the greatest common factor.
- Factor CalculatorFind all factors of a number, its factor pairs and its prime factorization. Also tells you whether the number is prime.
- Simplify Fractions CalculatorReduce a fraction to its lowest terms and convert an improper fraction to a mixed number, with the greatest common factor used.
- Fraction CalculatorAdd, subtract, multiply and divide fractions and mixed numbers. The answer is simplified and shown as a fraction, a mixed number and a decimal.
- Ratio CalculatorSimplify a ratio, solve for a missing value in A : B = C : D, or split a total in a given ratio. Works with whole numbers and decimals.
- Proportion CalculatorSolve a proportion a/b = c/d for the missing value by cross-multiplication. Enter any three of the four numbers.
- Rounding CalculatorRound a number to the nearest whole number, tenth, hundredth, thousandth, ten, hundred or thousand. Exact decimal rounding with no floating point errors.
- Significant Figures CalculatorCount the significant figures in a number and round it to any number of significant figures, with scientific notation.
- Modulo CalculatorCalculate a mod n, the remainder after division, with the quotient. Handles negative numbers under both the mathematical and programming conventions.
- Long Division CalculatorDivide whole numbers and see every step of the long division, with the quotient, remainder, mixed number and decimal answer.
- Decimal to Fraction CalculatorConvert a decimal to a fraction in lowest terms, or a fraction to a decimal. Exact conversion for terminating decimals.
- Exponent CalculatorRaise a number to any power, including negative and fractional exponents. Gives exact answers for whole numbers and scientific notation for large results.
Related unit converters
Calculations run in your browser and nothing you enter is sent to a server. Results are provided for general information. Check critical figures independently before relying on them.