Math

Instant, private, and free

Common Factor Calculator.

Find the greatest common factor of two safe integers.

On-device calculationNo signup
01

Set your values

Results update as you type.

Greatest common factor: 6

Greatest common factor

0.000000

Results update automatically as you type.

Use Cases

Simplify fractions

When simplifying a fraction, divide both numerator and denominator by their greatest common factor to get the simplest form.

Example: To simplify 24/36, find GCF(24,36)=12, then divide both by 12 to get 2/3.

Solve math problems and puzzles

Use the GCF to solve problems involving ratios, grouping items into equal sets, or finding common denominators in arithmetic.

Example: If you have 20 apples and 15 oranges, the largest number of identical fruit baskets you can make is GCF(20,15)=5.

Frequently Asked Questions

What is the greatest common factor (GCF)?
The greatest common factor (also called greatest common divisor, GCD) of two integers is the largest positive integer that divides both numbers without leaving a remainder. For example, the GCF of 12 and 18 is 6.
How do I use this calculator?
Simply enter two safe integers (whole numbers within JavaScript's safe integer range) into the 'First integer' and 'Second integer' fields. The calculator will compute and display their greatest common factor instantly.
What are 'safe integers'?
Safe integers are whole numbers between -9007199254740991 and 9007199254740991 (inclusive). These are numbers that JavaScript can represent exactly without rounding errors. This calculator is designed to work accurately within this range.

Tips & Common Mistakes

Tips

  • Enter only whole numbers (integers). Decimals or fractions will not work correctly.
  • The calculator works with negative numbers too. The GCF is always positive, so the sign of the inputs does not affect the result.
  • If one of the numbers is zero, the GCF is the absolute value of the other number.
  • For large numbers, ensure they are within the safe integer range to avoid precision errors.

Common Mistakes to Avoid

  • Entering numbers outside the safe integer range, which can lead to inaccurate results due to rounding errors.
  • Confusing the GCF with the least common multiple (LCM). The GCF is the largest divisor, while the LCM is the smallest multiple.
  • Thinking that the GCF must be one of the input numbers. It can be a smaller number that divides both.

Last updated: August 13, 2026