Free LCM Calculator (with Prime Factorization Steps)

LCM and GCF Calculator

Enter your numbers below to find the Least Common Multiple, Greatest Common Factor, and Prime Factorization.

Separate multiple numbers with commas.
Please enter at least two valid positive numbers.
LCM
0
GCF
0

Prime Factorization Steps

LCM and GCF calculator: Whether you are a student double-checking your math homework, a teacher building lesson plans, or a professional working with complex fractions, finding the exact multiples and factors of a set of numbers can be incredibly tedious.

The Least Common Multiple (LCM) is the smallest positive number that is a multiple of two or more numbers, which is essential when you need to find the lowest common denominator to add or subtract fractions. On the flip side, the Greatest Common Factor (GCF), also widely known as the Greatest Common Divisor (GCD) or Highest Common Factor (HCF), is the largest number that divides evenly into all of your chosen numbers.

While calculating the LCM and GCF of two small numbers is easy enough to do in your head, the math becomes extremely complicated once you introduce three, four, or five large numbers into the mix. Instead of drawing out massive factor trees on a scratchpad, our free LCM and GCF calculator does all the heavy lifting for you instantly. Simply type your numbers into the box, and the tool will immediately generate both your lowest multiple and your highest common factor simultaneously.

Quick Reference: Common Multiples and Factors

Number PairPrime FactorizationGCF (Greatest Common Factor)LCM (Least Common Multiple)
4 and 62×2 | 2×3212
8 and 122×2×2 | 2×2×3424
10 and 152×5 | 3×5530
12 and 182×2×3 | 2×3×3636
15 and 203×5 | 2×2×5560
24 and 362×2×2×3 | 2×2×3×31272

How to Use This Calculator

We designed this tool to be as fast and user-friendly as possible. Here is exactly how to get your answers in seconds:

  1. Enter Your Numbers: Click on the input box and type in the numbers you want to calculate.
  2. Separate with Commas: You can enter as many numbers as you need! Just make sure to separate each number with a comma (for example: 12, 18, 24).
  3. Hit Calculate: Tap the “Calculate Results” button.
  4. View Your Answers: The calculator will instantly display your LCM and GCF in the top highlight boxes.
  5. Check the Prime Factorization: Scroll down to see the exact, step-by-step prime factors for every single number you entered. This is perfect for students who need to “show their work” on assignments!

Formulas and Examples

Wondering how the calculator actually finds these numbers? The most accurate way to calculate the LCM and GCF without guessing is to use Prime Factorization.

Let’s look at a real-world example using the numbers 12 and 18.

Step 1: Find the Prime Factors

First, we break down each number into its basic prime building blocks (prime numbers like 2, 3, 5, 7, etc., that multiply together to make the original number).

  • Factors of 12: 2 × 2 × 3 (or 22 × 3)
  • Factors of 18: 2 × 3 × 3 (or 2 × 32)

Step 2: Calculating the GCF (Greatest Common Factor)

To find the GCF, you simply multiply the prime factors that both numbers share in common.

  • Both 12 and 18 share one “2” and one “3”.
  • Formula: 2 × 3 = 6
  • Result: The GCF of 12 and 18 is 6.

Step 3: Calculating the LCM (Least Common Multiple)

To find the LCM, you multiply the highest power of every prime factor present across all the numbers.

  • The highest power of 2 is 22 (from the 12).
  • The highest power of 3 is 32 (from the 18).
  • Formula: 22 × 32  →  4 × 9 = 36
  • Result: The LCM of 12 and 18 is 36.

Frequently Asked Questions

What is the difference between LCM and GCF?

The Least Common Multiple (LCM) looks “forward” to find the smallest number that your inputs can multiply into. The Greatest Common Factor (GCF) looks “backward” to find the largest number that can evenly divide into your inputs. For example, with 4 and 6, the LCM is 12, but the GCF is 2.

Are GCD, GCF, and HCF all the same thing?

Yes! Greatest Common Divisor (GCD), Greatest Common Factor (GCF), and Highest Common Factor (HCF) are simply different mathematical terms for the same calculation. Depending on where you live or what textbook you use, the terminology might change, but the math and the final answer are identical.

Can I find the LCM and GCF of more than two numbers?

Absolutely. You can find the LCM and GCF for three, four, or even ten numbers at the same time. Doing this manually requires extensive prime factorization trees, which is why using our calculator by entering a list (like 8, 14, 22, 30) is the fastest and most accurate method.

Why are LCM and GCF important in real life?

These calculations are essential for everyday math. The LCM is most commonly used when you need to add, subtract, or compare fractions with different denominators. The GCF is incredibly useful for simplifying those fractions into their lowest possible terms, making measurements in baking, construction, and engineering much easier to read.

How is prime factorization used to find the LCM?

Prime factorization breaks a number down into its core prime numbers (like 2, 3, and 5). To find the LCM using this method, you list out the prime factors of all your numbers, identify the highest power of each prime number used, and multiply those highest powers together to get your final lowest common multiple.