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 positive integer that divides two or more numbers without leaving a remainder. For example, the GCF of 12 and 18 is 6, because 6 divides both numbers evenly and no larger number does.
GCF is a fundamental concept in arithmetic and algebra. It is used to simplify fractions, solve ratio problems, and factor algebraic expressions. This calculator also computes the least common multiple (LCM), which is the smallest number that both values divide into evenly.
What This Calculator Does
Enter two or more integers and this calculator finds both the GCF and LCM instantly. It accepts comma-separated or space-separated values and handles any number of inputs.
- Inputs: Two or more non-zero integers
- Outputs: Greatest common factor (GCF) and least common multiple (LCM)
How the Calculation Works
Euclidean Algorithm for GCF
GCF(a, b) = GCF(b, a mod b), repeated until b = 0
The Euclidean algorithm is the most efficient way to compute the GCF. It repeatedly replaces the larger number with the remainder of dividing the two numbers until the remainder is zero. The last non-zero remainder is the GCF.
For more than two numbers, the GCF is computed step by step: GCF(a, b, c) = GCF(GCF(a, b), c).
LCM Formula
LCM(a, b) = |a x b| / GCF(a, b)
The LCM is derived from the GCF using this relationship. Multiplying two numbers and dividing by their GCF gives the smallest number that both divide into evenly.
How to Use the Calculator
- Type two or more integers into the input field, separated by commas or spaces
- The GCF and LCM update instantly as you type
- All numbers must be non-zero integers
Example Calculations
Example 1: Two Numbers
Find the GCF of 48 and 36. Using the Euclidean algorithm: 48 mod 36 = 12, then 36 mod 12 = 0. The GCF is 12. The LCM is (48 x 36) / 12 = 144.
Example 2: Three Numbers
Find the GCF of 12, 18, and 24. GCF(12, 18) = 6, then GCF(6, 24) = 6. The GCF is 6. LCM(12, 18) = 36, then LCM(36, 24) = 72. The LCM is 72.
Real-World Scenarios
Simplifying Fractions
To simplify 24/36, find GCF(24, 36) = 12. Divide both numerator and denominator by 12 to get 2/3. The GCF is the key to reducing fractions to their lowest terms.
Scheduling and Timing
Two buses depart from a station every 12 and 18 minutes. The LCM of 12 and 18 is 36, so the buses will depart together again every 36 minutes. The LCM solves repeating cycle problems like this.
Dividing Resources Evenly
You have 48 apples and 36 oranges that you want to divide into identical groups with nothing left over. The GCF of 48 and 36 is 12, so you can make 12 equal groups of 4 apples and 3 oranges each.
Why This Calculation Matters
The GCF and LCM appear throughout mathematics and daily life. They are essential for simplifying fractions, solving ratio and proportion problems, finding repeating patterns, and working with algebraic expressions. Understanding these values helps you work more efficiently with numbers.
Common Mistakes to Avoid
- Confusing GCF with LCM: The GCF is always less than or equal to the smaller number, while the LCM is always greater than or equal to the larger number
- Using 0 as an input: The GCF with zero is undefined in most practical applications. All inputs must be non-zero integers
- Using decimals: GCF and LCM apply to integers only. Convert decimals to fractions before finding the GCF
- Assuming GCF must be small: For two prime numbers like 7 and 11, the GCF is always 1 since they share no common factors