Enter numbers separated by commas to get the greatest common factor (GCF, GCD or HCF) and the least common multiple (LCM), worked out three ways: listing, the ladder method and prime factorization.
๐ Find the GCF and LCM
๐งญ How to use it
- Type 2 to 5 whole numbers separated by commas, e.g. 12, 18, and press Calculate.
- The GCF (greatest common factor, also called GCD or HCF) and the LCM (least common multiple) appear at the top.
- Below them the same answer is worked out three ways: listing, the ladder method and prime factorization โ pick the one your class uses.
๐ What are the GCF and LCM?
- Factors divide a number evenly. The factors of 12 are 1, 2, 3, 4, 6 and 12.
- Common factors are factors shared by two or more numbers; the largest is the greatest common factor. The common factors of 12 and 18 are 1, 2, 3 and 6, so GCF(12, 18) = 6.
- Multiples are 1ร, 2ร, 3ร โฆ a number. Common multiples are shared multiples; the smallest is the least common multiple. The common multiples of 12 and 18 are 36, 72, 108, โฆ so LCM(12, 18) = 36.
- Different countries use different names: GCF (US schools), GCD (greatest common divisor) and HCF (highest common factor, UK and India) all mean the same thing.
Where you use them
- GCF: simplifying fractions (12/18 รท 6 = 2/3), splitting things into equal groups with nothing left over.
- LCM: finding a common denominator to add fractions, working out when two repeating events happen together (buses every 12 and 18 minutes meet again after 36 minutes).
โ Frequently asked questions
How do you find the GCF of two numbers?
List the factors of both numbers and pick the largest one they share, or keep dividing both numbers by a common prime until no common factor other than 1 is left and multiply the primes you divided by. 12 and 18 both divide by 2 and then by 3, so the GCF is 2 ร 3 = 6.
How do you find the LCM of two numbers?
Use the ladder method, then multiply the primes on the left by the numbers left at the bottom: for 12 and 18 that is 2 ร 3 ร 2 ร 3 = 36. You can also divide the product of the two numbers by their GCF: 12 ร 18 รท 6 = 36.
How do you find the LCM of three numbers?
In the ladder, divide by a prime that divides at least two of the numbers and bring any number it does not divide straight down. Stop when no two numbers share a factor, then multiply the numbers on the left and along the bottom. The LCM of 12, 18 and 30 is 180. For the GCF, divide only by primes that divide all the numbers.
What does relatively prime (coprime) mean?
Two numbers are relatively prime, or coprime, when their GCF is 1. 8 and 15 share no factor except 1, so they are coprime, and the LCM of two coprime numbers is their product, 120.
Is there a connection between the GCF and the LCM?
For two whole numbers, the product of the numbers equals GCF ร LCM. For 84 and 126 the GCF is 42 and the LCM is 252, and 84 ร 126 = 42 ร 252 = 10,584. This rule does not hold for three or more numbers.
๐ More math calculators
Practice more: Math Worksheet Generator ยท Multiplication Chart ยท Percentage Calculator ยท Unit Converter
5 uses today ยท Everything is calculated in your browser โ the numbers you enter are never sent to a server.