CT Calc Tools

LCM & GCF Calculator

Find the least common multiple and greatest common factor of several numbers, with prime factorization. Free and private.

๐Ÿ”’ Runs entirely in your browser โ€” nothing is uploaded

GCF (GCD)

6

LCM

180

Advertisement

What the LCM and GCF mean

The greatest common factor (GCF), also known as the greatest common divisor (GCD), is the largest whole number that divides every number in a list without a remainder. The GCF of 12, 18 and 30 is 6. The least common multiple (LCM) is the smallest positive number that is a multiple of every number in the list. The LCM of 12, 18 and 30 is 180. Together they are the foundation of fraction arithmetic, ratio simplification and many scheduling puzzles.

This calculator accepts as many numbers as you like and uses big-integer arithmetic, so even very large inputs return exact answers. It also lists the prime factorization of each number, which is the classic school method for finding both values by hand.

How to find them by hand

With prime factorization, write each number as a product of primes. The GCF multiplies the primes shared by all numbers, using the smallest exponent. The LCM multiplies every prime that appears in any number, using the largest exponent. For 12 = 2ยฒ ร— 3, 18 = 2 ร— 3ยฒ and 30 = 2 ร— 3 ร— 5, the GCF is 2 ร— 3 = 6 and the LCM is 2ยฒ ร— 3ยฒ ร— 5 = 180. The Euclidean algorithm is faster for big numbers: GCF(48, 18) โ†’ 48 mod 18 = 12 โ†’ 18 mod 12 = 6 โ†’ 12 mod 6 = 0, so the GCF is 6.

Where you will use them

Use the GCF to reduce a fraction to lowest terms, split items into the largest equal groups, or tile a floor with the biggest square tiles. Use the LCM to find a common denominator when adding fractions, or to work out when repeating events line up, for example buses arriving every 12 and 18 minutes meet again after 36 minutes. A handy relationship for two numbers is GCF ร— LCM = a ร— b. Everything is calculated locally in your browser, so nothing you type is uploaded or stored.

How to use

  1. Enter your numbersType two or more positive whole numbers separated by commas, spaces or new lines.
  2. Read the GCF and LCMThe greatest common factor and least common multiple update instantly as you type.
  3. Check the prime factorsUse the prime factorization line to verify the result or copy it into your homework.

Frequently asked questions

What is the difference between LCM and GCF?
The GCF (greatest common factor, also called GCD) is the largest number that divides all the inputs. The LCM (least common multiple) is the smallest number that all the inputs divide into.
How many numbers can I enter?
Any amount of two or more positive whole numbers. Results use arbitrary-precision integers, so large values do not overflow.
How is the GCF calculated?
The calculator uses the Euclidean algorithm, repeatedly replacing the larger number by the remainder of division until the remainder is zero.
How is the LCM calculated?
For two numbers, LCM(a, b) = a ร— b รท GCF(a, b). For more numbers the same step is applied one number at a time.
Advertisement