GCF Calculator — Greatest Common Factor with Steps
Number Tools
Fast • Private • Works offline
Math calculator

GCF Calculator

Find the greatest common factor of two or more whole numbers—with common factors, prime factorizations, and every Euclidean step.

Enter numbers

What numbers are you comparing?

Use whole numbers. Negative values are accepted and calculated by absolute value.

Try an example
Result

Greatest common factor

GCF of 24 and 36
12
is the largest shared factor
GCF(24, 36) = 12
Both numbers divide evenly by 12.
Factor map Green = common factor
✓
Why 12 is the GCF

12 divides every entered number with no remainder, and no larger positive integer does.

What is a GCF?

The greatest common factor (GCF), also called the greatest common divisor (GCD) or highest common factor (HCF), is the largest positive integer that divides every selected number without a remainder.

ExampleFactors of 24: 1, 2, 3, 4, 6, 8, 12, 24
Factors of 36: 1, 2, 3, 4, 6, 9, 12, 18, 36
Greatest common factor = 12

How this calculator works

Choose the view that helps you learn or verify the answer.

How to find the GCF

For small numbers, list every factor and choose the largest one present in all lists. For large numbers, use the Euclidean algorithm: divide the larger number by the smaller, replace the pair with the smaller number and the remainder, and repeat. With more than two numbers, calculate the GCF of the first pair, then combine that result with each remaining number.

Frequently asked questions

Are GCF, GCD, and HCF the same?

Yes. Greatest common factor, greatest common divisor, and highest common factor are different names for the same value.

Can the GCF be 1?

Yes. Numbers whose only shared positive factor is 1 are called relatively prime or coprime.

What happens with negative numbers?

The sign does not change divisibility, so the calculator uses absolute values and returns a nonnegative GCF.

What is the GCF of a number and zero?

The GCF of zero and a nonzero number is the absolute value of the nonzero number. For all-zero inputs, this calculator displays 0 by convention.

GCF Calculator • Calculations happen entirely in your browser.