Greatest Common Factor Calculator
Find the largest whole number that divides two integers exactly.
Result
Greatest common factor: 42 factor
Both inputs divide evenly by the reported factor.
- First number divided by GCF
- 2
- Second number divided by GCF
- 3
- Coprime
- No
https://calcgallery.com/everyday-math/greatest-common-factor-calculator/
Results follow the mathematical operation and values shown. Check that you selected the intended operation, convention and dataset type before relying on the result. Read the full disclaimer
How to use the Greatest Common Factor Calculator
- Enter two positive whole numbers.
- Read the largest factor shared by both numbers.
- Use the quotients to confirm that both divisions are exact.
The largest shared exact divisor
The Euclidean algorithm avoids listing every factor. Repeated division with remainders ends at the greatest common factor:
while b is not zero: (a, b) = (b, a mod b)gcf = a
The displayed quotients show how many GCF-sized units fit in each input. A GCF of one means the numbers share no larger positive factor.
With your numbers
- Apply the Euclidean remainder steps to 84 and 126.
- The last non-zero divisor is 42.
Quick reference
Both inputs divide evenly by the reported factor.
| Example | Greatest common factor |
|---|---|
| 84 and 126 | 42 |
| 24 and 36 | 12 |
| 17 and 29 | 1 |
| 48 and 180 | 12 |
| 100 and 25 | 25 |
| 7 and 7 | 7 |
Common questions about the Greatest Common Factor Calculator
- What is a greatest common factor?
- It is the largest positive whole number that divides every entered number without a remainder.
- Is GCF the same as GCD?
- Yes. Greatest common factor and greatest common divisor name the same quantity.
- What does coprime mean?
- Two numbers are coprime when their greatest common factor is 1.
- How is the GCF calculated?
- The Euclidean algorithm repeatedly replaces a pair by the smaller number and the remainder until the remainder is zero.