GCF Calculator (Greatest Common Factor)
Find the greatest common factor of two or more numbers with Euclid’s algorithm and prime factorizations, plus the LCM. The GCF is the largest number that divides all inputs. Example: with numbers 48 36 120, the result is Greatest common factor (GCF) = 12; Least common multiple (LCM) = 720.
Last updated · By S. Dilshan · Runs in your browser, nothing is uploaded
Step-by-Step Solution
How do you use the GCF Calculator (Greatest Common Factor)?
Enter two or more whole numbers separated by commas or spaces. The calculator applies Euclid’s algorithm pair by pair, shows the prime factorizations and reports the greatest common factor (GCF, also called GCD or HCF), the LCM and the numbers divided by the GCF.
What formula does the GCF Calculator (Greatest Common Factor) use?
The GCF is the largest number that divides all inputs. Euclid’s algorithm uses GCD(a, b) = GCD(b, a mod b) until the remainder is 0, and for several numbers GCD(a, b, c) = GCD(GCD(a, b), c). From prime factorizations, take each shared prime at its lowest power.
Worked example: Numbers 48 36 120
For 48, 36 and 120: GCD(48, 36) = 12 and GCD(12, 120) = 12, so the GCF is 12. In primes, 48 = 2⁴ × 3, 36 = 2² × 3² and 120 = 2³ × 3 × 5, so the shared part is 2² × 3 = 12.
With the default values the calculator returns Greatest common factor (GCF) = 12; Least common multiple (LCM) = 720; Numbers = 3; Reduced numbers (÷ GCF) = 4, 3, 10.
Where Is This Calculation Used?
The GCF reduces fractions, splits things into the largest equal groups (48 apples, 36 pears and 120 plums fit into 12 identical baskets) and simplifies ratios. Dividing every input by the GCF gives the smallest whole-number ratio.
What are the most common mistakes with the GCF Calculator (Greatest Common Factor)?
- Confusing the GCF with the LCM; the GCF is never larger than the smallest input.
- Using only prime factors that appear in the first number.
- Taking the highest power of shared primes instead of the lowest.
What Is the Tested Example for the Default Values?
This example is computed by the same code that powers the calculator above, so you can compare it with your own numbers or a textbook answer.
| Input: Numbers | 48 36 120 |
|---|---|
| Greatest common factor (GCF) | 12 |
| Least common multiple (LCM) | 720 |
| Numbers | 3 |
| Reduced numbers (÷ GCF) | 4, 3, 10 |
Where Can You Verify These Formulas?
The definitions and formulas on this page follow standard references. Check them against these sources:
Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.
Frequently Asked Questions
What is the greatest common factor?
The largest whole number that divides every number in the list without a remainder.
Is GCF the same as GCD or HCF?
Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same value.
What is the GCF of numbers with no shared factor?
It is 1, and such numbers are called coprime or relatively prime.