Home / Math Calculators / Common Factor Calculator
Math & Number Tools

Common Factor Calculator

Find the common factors and greatest common factor (GCF), also called HCF or GCD, of two or more whole numbers. View each number’s factors and follow the calculation step by step.

✓ Common factors✓ GCF / HCF / GCD✓ Step-by-step results
Calculator

Enter your numbers

Separate numbers with commas, spaces, or new lines. Enter positive whole numbers from 1 to 1,000,000,000.

Try an example

Your results

Common factor results

Greatest common factor
6
GCF / HCF / GCD
Number of common factors
4
Including 1 and the GCF

All common factors

1236

Factors of each number

12
1, 2, 3, 4, 6, 12
18
1, 2, 3, 6, 9, 18

How the answer was found

Common factors1, 2, 3, and 6 divide both 12 and 18 evenly. The greatest is 6.

What is a common factor?

A factor is a whole number that divides another number without leaving a remainder. A common factor divides every number in the selected group. The greatest common factor (GCF) is the largest of those shared factors. It is also called the highest common factor (HCF) or greatest common divisor (GCD).

Greatest common factorGCF(a, b) = the largest positive integer that divides both a and b exactly.
Euclidean algorithmGCF(a, b) = GCF(b, a mod b), repeated until the remainder is zero.

Example: common factors of 12 and 18

The factors of 12 are 1, 2, 3, 4, 6, and 12. The factors of 18 are 1, 2, 3, 6, 9, and 18. Their shared factors are 1, 2, 3, and 6, so their greatest common factor is 6.

Step-by-step example12 = 2² × 3
18 = 2 × 3²
Shared prime factors at the smallest powers: 2 × 3 = 6
GCF(12, 18) = 6

How to use this calculator

  1. Enter between 2 and 10 positive whole numbers.
  2. Separate each number with a comma, space, or new line.
  3. Select Find common factors.
  4. Read the GCF, the list of all common factors, each number’s factor list, and the explanation.
  5. Use Copy results to copy the calculation summary.

The calculator accepts whole numbers up to 1,000,000,000 each and displays every factor for each input. Very large numbers can have many factors, so processing may take longer for some inputs.

Frequently asked questions

Is GCF the same as HCF and GCD?

Yes. Greatest common factor (GCF), highest common factor (HCF), and greatest common divisor (GCD) are different names for the same mathematical value.

What is the difference between a common factor and the GCF?

A common factor divides all the numbers exactly. The GCF is the largest number in the set of common factors.

What is the GCF of 12 and 18?

The GCF is 6. Their common factors are 1, 2, 3, and 6.

Can I find the common factors of more than two numbers?

Yes. Enter 2 to 10 whole numbers. The calculator finds factors shared by every number in the list and returns their greatest common factor.

What does it mean if the GCF is 1?

If the GCF is 1, the numbers are coprime (or relatively prime). They have no common positive factor other than 1.

How is the GCF useful?

The GCF can simplify fractions, divide items into the largest equal groups, and reduce ratios to their simplest whole-number form.