ToolForge
Advertisement

GCF / LCM Calculator

Calculate Greatest Common Factor and Least Common Multiple

Written by toolforge.websiteLast reviewed How we build and check these tools

GCF / LCM Calculator tool

Results

GCF (GCD)

LCM

GCF / LCM Calculator: key facts

What it does
Calculate Greatest Common Factor and Least Common Multiple
Category
Math Calculators
Cost
Free, with no account, sign-up, or install.
Your data
Runs entirely in your browser — the files and text you enter are never uploaded to a server.
Last reviewed
. Report an incorrect result.
Advertisement

What the GCF / LCM Calculator does

The greatest common factor and least common multiple are workhorses of arithmetic — you need the GCF to simplify fractions and the LCM to add them. This calculator finds both for two or more numbers at once, and shows the prime factorizations and the Euclidean-algorithm steps behind the answers.

Students use it throughout fraction work and number theory; it also turns up in scheduling problems, where the LCM tells you when repeating events coincide. Beyond the answers, it verifies them — confirming that GCF times LCM equals the product of the numbers — and lays out Euclid's method step by step.

Using the GCF / LCM Calculator, step by step

  1. Enter two or more whole numbers, separated by commas.
  2. Read the GCF (greatest common factor) and the LCM (least common multiple).
  3. Review the prime factorization of each number.
  4. Follow Euclid's algorithm steps and the verification that GCF × LCM equals the product.

The Euclidean algorithm, and the product identity

The greatest common factor is found with the Euclidean algorithm, which repeatedly replaces the larger number with the remainder of dividing it by the smaller until nothing is left over. It dates to Euclid's Elements and remains one of the most efficient algorithms known — it finishes in a handful of steps even for very large inputs, which is why it underpins modern cryptography.

The least common multiple is then derived rather than searched for, using the identity that the product of two numbers equals the product of their greatest common factor and least common multiple. Dividing the product by the GCF gives the LCM directly, with no need to list multiples.

For more than two numbers the tool folds pairwise, taking the result of the first pair and combining it with the next. That works because both operations are associative.

GCF: repeatedly replace (a, b) with (b, a mod b) until b = 0 LCM(a, b) = |a × b| ÷ GCF(a, b)
  • The defaults — 48 and 180 — have a greatest common factor of 12 and a least common multiple of 720.
  • Check the identity: 48 × 180 = 8,640, and 12 × 720 = 8,640.
  • Numbers sharing no factors, such as 8 and 15, have a GCF of 1 and an LCM equal to their product, 120.

What makes this one worth using

  • It computes both the GCF and the LCM together for any list of numbers, not just a pair.
  • It shows each number's prime factorization and the full Euclidean-algorithm steps, making the method visible.
  • It verifies the result by checking that GCF × LCM equals the product of the inputs, so you can trust the answer.
  • It runs locally and instantly, with no sign-up.

Where each one is the tool you need

The two answer opposite questions and are easy to reach for the wrong way round. GCF is about dividing something up — reducing a fraction to lowest terms, cutting material into the largest equal pieces with nothing left over, arranging items into the largest possible equal groups. LCM is about things coming back into alignment — finding a common denominator, working out when two recurring events next coincide, or when two gears return to their starting positions.

A useful sanity check: the GCF can never exceed the smaller input and the LCM can never be less than the larger one. If a result falls outside those bounds, something has gone wrong.

Numbers with a GCF of 1 are called coprime or relatively prime, and they need share no primes at all despite both being composite — 8 and 15 are the standard illustration. Coprimality is what makes fractions irreducible and is a requirement in several cryptographic constructions.

Frequently Asked Questions

What is the difference between GCF and LCM?

The greatest common factor is the largest number that divides all your values evenly — used to simplify fractions. The least common multiple is the smallest number all your values divide into — used to find a common denominator. This calculator gives both.

How does Euclid's algorithm find the GCF?

It repeatedly replaces the larger number with the remainder of dividing it by the smaller, until the remainder is zero; the last non-zero value is the GCF. The calculator shows each division step so you can follow the process.

How are GCF and LCM related?

For any two numbers, their GCF multiplied by their LCM equals the product of the numbers themselves. The calculator uses this relationship as a verification check, marking the result correct when it holds.

Where is the LCM used in real life?

The least common multiple answers "when do repeating cycles line up again?" — when two buses on different schedules next depart together, or when adding fractions with unlike denominators. The GCF, by contrast, shows up whenever you reduce a fraction to simplest form.

Related Tools

Advertisement
Buy Me a Coffee