Skip to content

Install ALink Tools

Free browser tools for images, PDFs, media, text and web checks. Most tools process files locally on your device.

  1. Tap the Share button in the Safari toolbar.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add. ALink Tools then opens from your Home Screen like an app.

GCF and LCM Calculator

Find the greatest common factor (also called GCD) and the least common multiple of two or more integers, and see each number’s prime factors.

Runs in your browserRuns in your browserEuclidean algorithm
1

Enter integers

Limits

  • Whole numbers only, at most 20 at a time.
  • Prime factorization is trial division for modest integers.
  • Results are exact integers, not decimal approximations.
2

GCF, LCM, and factors

GCF (GCD)
—

How to use GCF and LCM

  1. Type at least two integersSeparate them with commas or spaces. Up to 20 numbers.
  2. Read GCF and LCMGCF uses the Euclidean algorithm pairwise. LCM uses |a × b| / GCF(a, b).
  3. Check the factor tablePrime factors are found by trial division, which is intended for modest integers.

Limits and how it works

  • Whole numbers only, at most 20 at a time.
  • Prime factorization is trial division for modest integers.
  • Results are exact integers, not decimal approximations.

How GCF and LCM are computed

The greatest common factor (also called GCD) is computed with the Euclidean algorithm: repeatedly replace (a, b) with (b, a mod b) until the remainder is 0. For more than two integers, GCF is reduced pairwise. The least common multiple uses LCM(a, b) = |a × b| / GCF(a, b), also reduced pairwise. Factorization is trial division and is meant for modest integers.

Frequently asked questions

What about 0?

GCF(0, n) is |n|. LCM(0, n) is 0.

Do negative numbers change the result?

Signs are ignored. GCF and LCM are reported as non-negative integers.

Is anything uploaded?

No. Nothing leaves your browser.

Related tools

All tools