Beginner

Common Factor Calculator — GCF & All Common Factors

Enter two positive integers to find their greatest common factor (GCF) — also called the highest common factor (HCF) — and a complete list of all common factors. The GCF is the largest integer that divides both numbers exactly.
Greatest common factor (GCF)
12

Largest integer that divides both numbers without a remainder

First number
48
Second number
36
GCF
12
Number of factors
6
All common factors
1, 2, 3, 4, 6, 12
Largest factor
12
01.534.567.5910.5121234612Common factors marked on the number line (up to GCF)
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

GCF(a, b) is found with the Euclidean algorithm: repeatedly replace (a, b) with (b, a mod b) until b = 0; the last a is the GCF. All common factors are the divisors of the GCF. Enter two integers to see the GCF and every common factor listed.

Formula
GCF(a, b) via Euclidean algorithm: repeatedly replace (a, b) with (b, a mod b) until b = 0 — then GCF = a. Common factors = all divisors of GCF(a, b).
How this is calculated

Two integers share a common factor if that factor divides both without a remainder. The greatest common factor (GCF), also called the GCD (greatest common divisor) or HCF, is the largest such number. The Euclidean algorithm finds it efficiently: divide the larger number by the smaller and keep the remainder; repeat with the smaller number and the remainder until the remainder is zero — the last non-zero divisor is the GCF.

All common factors of a and b are exactly the positive divisors of their GCF. If GCF(a, b) = g, then any divisor d of g also divides both a and b, because g | a and g | b imply d | a and d | b. So the set of common factors is found by listing all divisors of g, which are found by trial division up to √g.

The GCF has important applications: simplifying fractions (divide numerator and denominator by GCF), finding the LCD for adding fractions (LCD = a × b ÷ GCF), and in cryptography (RSA key generation depends on the GCF of candidate primes).

Frequently asked questions

The GCF (greatest common factor) is the largest number that divides both integers — useful for simplifying fractions. The LCM (least common multiple) is the smallest number both integers divide into — useful for finding common denominators. They are related by GCF(a,b) × LCM(a,b) = a × b.

A GCF of 1 means the only common factor is 1 — the numbers are said to be coprime (or relatively prime). For example, GCF(8, 15) = 1 because 8 and 15 share no common prime factors. Coprime numbers are important in fraction simplification and modular arithmetic.

Yes. The GCF of three or more numbers is found by applying the algorithm pairwise: GCF(a, b, c) = GCF(GCF(a, b), c). Each step reduces the problem to a two-number GCF until all numbers are covered.

Also known as

common factor calculator
greatest common factor calculator
gcf calculator
highest common factor hcf
common divisors of two numbers
euclidean algorithm gcd
list all common factors

APA

TG we-Calculate Editorial Team. (2026). Common Factor Calculator — GCF & All Common Factors [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/common-factor-calculator

Chicago

TG we-Calculate Editorial Team. "Common Factor Calculator — GCF & All Common Factors." TG we-Calculate. 2026. https://we-calculate.com/calculator/common-factor-calculator.

IEEE

TG we-Calculate Editorial Team, "Common Factor Calculator — GCF & All Common Factors," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/common-factor-calculator

BibTeX

@misc{wecalculate_common_factor_calculator, title = {Common Factor Calculator — GCF & All Common Factors}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/common-factor-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?