Least Common Factor Calculator

Enter two to four positive integers to see their least common factor (always 1), greatest common factor (GCF), and least common multiple (LCM).

Quick Facts

Least common factor
Always 1
1 divides every integer, so it's the smallest factor any set of numbers can share.
GCF formula
gcd(a,b) = gcd(b, a mod b)
Euclidean algorithm — repeat until the remainder is 0; the last nonzero value is the GCF.
LCM formula
LCM(a,b) = |a×b| / GCF(a,b)
Extends to more numbers by combining results two at a time.

Your Results

Calculated
Least Common Factor (LCF)
-
Always 1 for any set of integers
Greatest Common Factor (GCF)
-
Computed via the Euclidean algorithm
Least Common Multiple (LCM)
-
LCM = |a×b| / GCF(a,b)
Numbers Used
-
Values included in this calculation

Ready

Enter at least two positive integers, then press Calculate.

How the Least Common Factor, GCF, and LCM Are Calculated

"Least common factor" is a widely searched phrase, but mathematically it has a trivial answer: the least common factor of any set of positive integers is always 1. This calculator explains why, and then computes the two values people usually mean instead — the greatest common factor (GCF) and the least common multiple (LCM) — from the numbers you enter.

Why the least common factor is always 1

A factor of a number is any positive integer that divides it evenly, with no remainder. Since 1 divides every whole number without a remainder, 1 is a common factor of any set of integers you choose — and no smaller positive whole number exists. That makes 1 the least common factor of any two or more numbers, always. There is nothing to calculate: LCF(12, 18) = 1, LCF(7, 100) = 1, and so on for every possible input.

Finding the greatest common factor (GCF) with the Euclidean algorithm

What most people actually want is the GCF (also called the greatest common divisor, or GCD): the largest number that divides all the given numbers with no remainder. This calculator uses the Euclidean algorithm: divide the larger number by the smaller one, keep the remainder, then repeat with the smaller number and that remainder until the remainder reaches 0. The last nonzero remainder is the GCF. For 12 and 18: 18 mod 12 = 6, then 12 mod 6 = 0, so GCF(12, 18) = 6. With more than two numbers, the calculator applies the same process pairwise across the whole list.

Finding the least common multiple (LCM)

The other common target is the LCM: the smallest positive number that all the given numbers divide into evenly. It is related to the GCF by the formula LCM(a, b) = |a × b| / GCF(a, b). For 12 and 18, LCM = (12 × 18) / 6 = 36. With more than two numbers, the calculator combines them two at a time — first LCM(a, b), then LCM(that result, c), and so on — to reach the LCM of the whole list.

Common uses

The GCF is used to reduce fractions to lowest terms (divide numerator and denominator by their GCF) and to split items into the largest possible equal groups. The LCM is used to find common denominators when adding or subtracting fractions, and to schedule recurring events so they line up — for example, two buses that leave every 12 and 18 minutes both leave together every LCM(12, 18) = 36 minutes.

Frequently Asked Questions

What is the least common factor of two or more numbers?
The least common factor (LCF) of any set of positive integers is always 1, because 1 divides every integer and no smaller positive whole number exists. For example, the least common factor of 12 and 18 is 1, even though they share other common factors like 2, 3, and 6.
Do people usually mean GCF or LCM when they say "least common factor"?
Yes. "Least common factor" is a common mix-up of two different terms: greatest common factor (GCF), the largest number that divides all the given numbers, and least common multiple (LCM), the smallest number that all the given numbers divide into. This calculator computes both so you get the value you actually need.
How is the greatest common factor (GCF) calculated?
The GCF is found with the Euclidean algorithm: divide the larger number by the smaller one, replace the larger number with the remainder, and repeat until the remainder is 0. The last nonzero remainder is the GCF. For example, GCF(12, 18): 18 mod 12 = 6, then 12 mod 6 = 0, so GCF(12, 18) = 6.
How is the least common multiple (LCM) calculated?
For two numbers, LCM(a, b) = |a × b| / GCF(a, b). For example, LCM(12, 18) = (12 × 18) / 6 = 36. For three or more numbers, the calculator applies this formula pairwise, combining the running LCM with each additional number.