GCF and LCM Calculator
Find the greatest common factor and least common multiple of two or more numbers, with the prime factorization of each one.
How to use it
- 01
Enter two or more whole numbers, separated by commas or spaces.
- 02
You’ll see the GCF and LCM, plus the prime factorization of each number.
- 03
Below that, you can see how each result is built from the prime factors.
How it works
The greatest common factor (also called the greatest common divisor, or GCD) is the largest number that divides evenly into all of them. To find it, multiply the prime factors every number shares, each raised to the lowest exponent it appears with.
The least common multiple is the smallest number that all of them divide into evenly. To find it, multiply every prime factor that appears, shared or not, each raised to its highest exponent.
For any two numbers, GCF × LCM = a × b, which makes a handy way to check your answer. You use the GCF to simplify fractions and the LCM to find a common denominator when adding them.
Examples
- GCF and LCM of 12 and 18
12 = 2² × 3 and 18 = 2 × 3², so the GCF = 2 × 3 = 6 and the LCM = 2² × 3² = 36.
- Three numbers
For 12, 18 and 30, the GCF is 6 and the LCM is 180.
- Bus schedule word problem
If one bus comes every 12 minutes and another every 18, they’ll arrive at the same time every 36 minutes (the LCM).
Frequently asked questions
What is the GCF used for?
Splitting things into the largest possible equal groups (like cutting a 12-foot and an 18-foot board into equal 6-foot pieces) and simplifying fractions.
What is the LCM used for?
Figuring out when two repeating events will line up again, and finding the least common denominator when adding or subtracting fractions.
Is GCF the same as GCD and HCF?
Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same thing.
Related tools
- 08.04
Prime Factorization Calculator
Education - 08.01
Fraction Calculator
Education - 08.02
Multiplication Tables
Education - 08.05
Quadratic Equation Solver
Education - 08.06
Grade Calculator
Education - 08.07
Standard Deviation Calculator
Education - 08.08
Area and Perimeter Calculator
Education - 08.09
Pythagorean Theorem Calculator
Education