✨ 50+ Free Calculators  —  No Signup Required  —  Fast & Accurate Results

GCF and LCM Calculator – Find Greatest Common Factor and Least Common Multiple

Written by CalculatorSphere Team• Last updated: August 5, 2026How we verify our calculators

Quick answer: The Greatest Common Factor (GCF) is the largest number that divides evenly into two or more numbers, and the Least Common Multiple (LCM) is the smallest number that is a multiple of two or more numbers. For example, the GCF of 12 and 18 is 6, and the LCM of 12 and 18 is 36. Use the calculator below to find both instantly for any set of numbers.

GCF and LCM Calculator

Enter two or more numbers separated by commas to find their GCF and LCM.



Advertisement

How to Find GCF and LCM

The most reliable method for finding GCF by hand is the Euclidean algorithm, which repeatedly divides and takes remainders until you reach zero. The LCM can then be found using the relationship between GCF and LCM:

LCM(a, b) = (a x b) / GCF(a, b)

Worked Example: GCF and LCM of 12 and 18

StepCalculationResult
1. Divide 18 by 1218 = 1 x 12 + 6remainder 6
2. Divide 12 by 612 = 2 x 6 + 0remainder 0
3. GCF foundLast non-zero remainderGCF = 6
4. Calculate LCM(12 x 18) / 6LCM = 36

Prime Factorization Method

Another common approach is breaking each number into its prime factors, then comparing them.

NumberPrime Factorization
122 x 2 x 3
182 x 3 x 3

GCF uses the lowest power of each shared prime factor: common factors are 2 and 3, so GCF = 2 x 3 = 6.

LCM uses the highest power of every prime factor that appears in either number: 2 x 2 x 3 x 3 = 36.

Common GCF and LCM Pairs Reference Table

NumbersGCFLCM
4, 6212
8, 12424
15, 20560
9, 12, 153180
10, 25550
7, 9163

Real-World Uses for GCF and LCM

  • Simplifying fractions: Divide the numerator and denominator by their GCF to reduce a fraction to lowest terms.
  • Adding fractions with different denominators: Use the LCM of the denominators as the common denominator.
  • Scheduling problems: If two events repeat every 4 and 6 days, the LCM (12) tells you when they will next coincide.
  • Dividing items into equal groups: GCF tells you the largest group size you can make from different quantities without leftovers, such as splitting 12 apples and 18 oranges into identical fruit baskets (6 baskets).
  • Gear and rotation problems: LCM is used in engineering to determine when rotating parts with different cycle lengths will align again.
Advertisement

Frequently Asked Questions

What is the difference between GCF and LCM?

GCF (Greatest Common Factor) is the largest number that divides evenly into a set of numbers, while LCM (Least Common Multiple) is the smallest number that all the numbers divide into evenly. They are opposite but related concepts.

What is the GCF of two prime numbers?

The GCF of two different prime numbers is always 1, since prime numbers have no common factors besides 1.

What is the LCM used for in fractions?

The LCM of the denominators is used as the common denominator when adding or subtracting fractions with different denominators.

Can GCF and LCM be calculated for more than two numbers?

Yes. Calculate the GCF or LCM of the first two numbers, then repeat the process using that result and the next number, continuing until all numbers are included.

Is GCF also called HCF?

Yes, GCF (Greatest Common Factor) and HCF (Highest Common Factor) refer to the same concept and are used interchangeably depending on regional math curricula, with HCF more common in UK and Indian textbooks.

What is the relationship between GCF and LCM?

For any two numbers a and b, the product of their GCF and LCM equals the product of the two numbers: GCF(a,b) x LCM(a,b) = a x b.

How do I find the GCF of numbers with no common factors besides 1?

If the only common factor is 1, the numbers are called coprime or relatively prime, and their LCM is simply the product of the numbers.

Why is the Euclidean algorithm faster than listing factors?

The Euclidean algorithm finds the GCF through repeated division in just a few steps, even for very large numbers, while listing all factors becomes slow and error-prone as numbers grow.

Common Mistakes When Finding GCF and LCM

Students and quick manual calculations often run into a few recurring errors. The first is confusing GCF and LCM themselves, since both involve comparing shared factors between numbers; a helpful memory trick is that GCF is always less than or equal to the smallest number in the set, while LCM is always greater than or equal to the largest number.

The second common mistake is forgetting to use the lowest shared power of a prime factor for GCF and the highest power for LCM when using the prime factorization method. For example, with 8 (2 x 2 x 2) and 12 (2 x 2 x 3), the shared prime is 2, and the lowest shared power is 2 squared (4), not 2 cubed, so GCF = 4, not 8.

The third mistake is applying the two-number shortcut formula (LCM = a times b divided by GCF) directly to three or more numbers at once, which does not work reliably. Instead, calculate the LCM of the first two numbers, then find the LCM of that result and the third number, continuing one pair at a time.

Conclusion

GCF and LCM are foundational math concepts used everywhere from simplifying fractions to solving real-world scheduling and grouping problems. Use the calculator above to instantly find both for any set of numbers, and refer to the worked examples and reference table for quick manual checks.

Related Calculators

Leave a Comment

Your email address will not be published. Required fields are marked *

Advertisement
Advertisement
Advertisement
Scroll to Top