Greatest Common Factor Calculator
Find the greatest common factor of two or more numbers.
Understanding Greatest Common Factor Calculator
The Greatest Common Factor (GCF) Calculator finds the largest positive integer that divides two or more integers evenly, without leaving a remainder. The GCF is also commonly called the Greatest Common Divisor (GCD).
Enter two or more integers separated by commas to calculate their GCF. The calculator provides the result along with prime factorization, the Euclidean algorithm, common factors, and verification of the final answer.
A practical way to use this calculator
Greatest Common Factor Calculator is intended to show the mathematical relationship behind the answer, not just return a number. Enter the quantities requested by the selected method—such as Numbers—and keep their units or mathematical meaning consistent. Where this calculator offers different shapes, methods, or forms, choose the one that matches the problem before entering the values.
Reading the number correctly
For a useful check, look at the units and the scale of the answer before accepting it. A formula can be evaluated correctly while an input is still inappropriate for the problem. Repeating the calculation with a simple test value or checking the result against the expected direction of change can help identify an input mistake.
Greatest Common Factor Calculator
The Greatest Common Factor (GCF) Calculator finds the largest positive integer that divides two or more integers evenly, without leaving a remainder. The GCF is also commonly called the Greatest Common Divisor (GCD).
Enter two or more integers separated by commas to calculate their GCF. The calculator provides the result along with prime factorization, the Euclidean algorithm, common factors, and verification of the final answer.
What Is the Greatest Common Factor?
A factor of an integer is a number that divides it evenly. When two or more numbers have factors in common, the greatest common factor is the largest factor shared by all of them.
For example, the factors of 12 are 1, 2, 3, 4, 6, and 12, while the factors of 18 are 1, 2, 3, 6, 9, and 18. The common factors are 1, 2, 3, and 6, so the GCF is 6.
GCF and GCD
The terms Greatest Common Factor (GCF) and Greatest Common Divisor (GCD) describe the same mathematical concept. The term GCF is commonly used when discussing factors, while GCD is often used in number theory and algorithms.
Both refer to the largest positive integer that divides every number in a given set without leaving a remainder.
Finding the GCF by Listing Factors
One simple way to find the GCF of small numbers is to list the factors of each number and identify the largest factor they have in common.
For example, consider 24 and 36.
1, 2, 3, 4, 6, 8, 12, 24
Factors of 36:
1, 2, 3, 4, 6, 9, 12, 18, 36
Their common factors include 1, 2, 3, 4, 6, and 12. The largest is 12, so:
GCF Using Prime Factorization
Another method is to express each number as a product of prime numbers. To find the GCF, keep only the prime factors shared by every number and use the smallest exponent for each shared prime.
Consider 24 and 36:
36 = 22 × 32
The prime 2 appears in both factorizations, and the smaller exponent is 22. The prime 3 also appears in both, with the smaller exponent being 31.
The Euclidean Algorithm
The Euclidean algorithm is one of the most efficient methods for finding the GCF of two integers. It is based on the fact that replacing the larger number with the remainder from division does not change the GCF.
For example, to find the GCF of 48 and 18:
18 = 12 × 1 + 6
12 = 6 × 2 + 0
The last nonzero remainder is 6, so:
GCF of More Than Two Numbers
The GCF can be calculated for three or more numbers. One way to do this is to calculate the GCF of the first two numbers and then calculate the GCF of that result with the next number.
For example, consider 24, 36, and 48.
GCF(12, 48) = 12
Therefore:
GCF of Negative Numbers
The GCF is normally defined as a nonnegative value, so the signs of the input integers do not affect the magnitude of the result. The calculator uses the absolute values of the numbers when determining their GCF.
The positive value 12 is used because the GCF is conventionally reported as a positive divisor.
GCF and Zero
Zero has a special relationship with the GCF. For any nonzero integer a:
For example:
When every number entered is zero, the GCF is conventionally defined as 0.
GCF and Fractions
One of the most common uses of the GCF is simplifying fractions. To reduce a fraction to its simplest form, divide both the numerator and denominator by their GCF.
For example, consider the fraction 24/36. The GCF of 24 and 36 is 12, so divide both values by 12:
36 ÷ 12 = 3
24/36 = 2/3
GCF and Ratios
The GCF can also be used to simplify ratios. Dividing every part of a ratio by the GCF produces an equivalent ratio in its simplest whole-number form.
For example, the ratio 24:36 has a GCF of 12:
= 2 : 3
GCF vs. LCM
The GCF and Least Common Multiple (LCM) solve opposite types of problems. The GCF identifies the largest value that divides all the numbers, while the LCM identifies the smallest positive value that is divisible by all the numbers.
LCM → smallest common multiple
For two nonzero integers, the two quantities are related by:
Examples of GCF
GCF of 12 and 18: 6.
GCF of 24 and 36: 12.
GCF of 24, 36, and 48: 12.
GCF of 15 and 25: 5.
GCF of 8 and 20: 4.
Why the GCF Is Useful
The greatest common factor is used throughout mathematics. It helps simplify fractions and ratios, identify shared factors, perform integer factorization, solve divisibility problems, and work with mathematical expressions that contain common factors.
In practical problem solving, finding the GCF can also help determine the largest equal groups or the largest common unit that can be used to divide quantities without leftovers.
Greatest Common Factor Formula
For two integers, the GCF can be calculated through the Euclidean algorithm or through prime factorization. Its relationship with the LCM is:
Using the LCM, the GCF can therefore also be expressed as:
Disclaimer
This calculator is intended for informational purposes only. While we strive for accuracy, we cannot guarantee that every result is correct for every situation.