CalculatorForEver
MATH / CALCULATOR

Greatest Common Factor Calculator

Find the largest factor shared by two positive integers.

The greatest common factor is the largest positive integer that divides both entered positive whole numbers. It is also called the greatest common divisor or GCD.

Your numbers

BROWSER-LOCAL INPUTS

Your inputs stay in this browser. No account needed.

RESULT

Your result

Enter your values and select Calculate.

Check the units and assumptions before using this result.

METHOD

How the greatest common factor calculator works

How to use this calculator

Enter both integers. Dividing each by the GCF gives their simplified ratio.

What the result means

The greatest common factor is the largest positive integer that divides both inputs without a remainder. It also tells you how far a fraction or ratio can be reduced in one step. A GCF of 1 means the two integers are relatively prime.

The formula

Use Euclid’s algorithm: replace (a,b) by (b,a mod b) until b = 0

A worked example

The greatest common factor of 12 and 18 is 6.

Assumptions & methodology

Use positive whole numbers, not decimals or fractions. Results are rounded for display; intermediate calculations retain precision. This tool is informational and does not replace institutional or professional guidance.

References

OpenStax: Introductory Statistics and Prealgebra.

INTERPRETATION

Understanding greatest common factor results

Use it to simplify a fraction or ratio

Dividing both numerator and denominator by their GCF produces a reduced fraction. The same operation reduces a two-number ratio without changing its proportions. A GCF of one means the two values are relatively prime, even if neither value is itself a prime number.

GCF and LCM answer different questions

GCF looks for a shared divisor; LCM looks for a shared multiple. For two positive integers, their product equals GCF multiplied by LCM. Prime factorization can help explain why the common factors are present.

Example: greatest common factor and fraction reduction

For 24 and 36, the largest shared factor is 12. GCF is also called GCD or HCF.
StepResult
24 as prime factors2 × 2 × 2 × 3
36 as prime factors2 × 2 × 3 × 3
Shared prime factors2 × 2 × 3 = 12
Reduce 24/36 by 122/3
RELATED GUIDES

Greatest Common Factor questions and examples

Read a worked explanation before trying another calculation.

QUESTIONS

Greatest Common Factor questions

Is GCF different from GCD?+

No. Greatest common factor and greatest common divisor refer to the same quantity here.

Can two composite numbers have a GCF of 1?+

Yes. For example, 8 and 9 are both composite but have no common positive factor larger than 1.