GCF & LCM Calculator

Find the GCF and LCM of any numbers.

  • No signup required
  • Instant results
  • Step-by-step solutions

Press Enter to submit

Better Analyst AI data analysis

Go beyond one calculation with Better Analyst

Upload an Excel, CSV, or PDF file to analyze a complete dataset, ask follow-up questions, create charts, and get clear answers in seconds.

No credit card required. Free plan included.

Try Better Analyst free

What Is a GCF and LCM Calculator?

A GCF and LCM calculator finds the Greatest Common Factor and Least Common Multiple of two or more numbers simultaneously. The GCF (also called GCD, Greatest Common Divisor) is the largest number that divides evenly into all given numbers. The LCM is the smallest number that all given numbers divide into evenly. These two values are deeply interconnected.

This calculator uses prime factorization to find both values, breaking each number down into its prime components. It shows the shared and unshared factors visually, making it clear how the GCF and LCM are determined. This is essential knowledge for fractions, algebra, number theory, and everyday math.

Common Use Cases

  • Simplifying fractions - Divide numerator and denominator by the GCF to reduce to lowest terms
  • Adding fractions with unlike denominators - The LCM of the denominators is the least common denominator (LCD)
  • Scheduling and cycles - Finding when two repeating events align (e.g., two machines with different cycle times)
  • Music theory - Calculating rhythmic patterns and polyrhythms that synchronize at the LCM of beat intervals
  • Number theory - Investigating divisibility, modular arithmetic, and algebraic structures
  • Word problems - Classic problems about groups, arrangements, and dividing items into equal sets

Why GCF and LCM Are Challenging

  • People confuse the two - GCF is the largest shared factor (smaller than or equal to the smallest input), while LCM is the smallest shared multiple (larger than or equal to the largest input). Mixing them up leads to completely wrong answers
  • Finding prime factors is tedious - Factoring large numbers by hand requires testing many potential divisors, especially if the number is a product of large primes
  • More than two numbers complicate the process - While the concept extends naturally, the bookkeeping for prime factorization of 3 or more numbers becomes error-prone
  • The relationship between GCF and LCM is non-obvious - For two numbers a and b, GCF(a,b) x LCM(a,b) = a x b. This shortcut is powerful but often forgotten

How It Works

The prime factorization method breaks each number into its prime factors. The GCF is the product of all shared prime factors, each taken to the lowest power that appears. The LCM is the product of all prime factors, each taken to the highest power that appears. For example, 12 = 2^2 x 3 and 18 = 2 x 3^2. GCF: 2^1 x 3^1 = 6. LCM: 2^2 x 3^2 = 36.

An alternative is the Euclidean algorithm for GCF, which uses repeated division: GCF(a, b) = GCF(b, a mod b) until the remainder is 0. Then use the relationship LCM(a, b) = (a x b) / GCF(a, b). Both methods produce the same result, but prime factorization reveals more about the number structure.

Example

Find the GCF and LCM of 24 and 36. Prime factorization: 24 = 2^3 x 3 and 36 = 2^2 x 3^2. GCF: take lowest powers of shared primes: 2^2 x 3^1 = 12. LCM: take highest powers of all primes: 2^3 x 3^2 = 72. Check: 12 x 72 = 864 = 24 x 36. Confirmed.

Key Examples

  • GCF(15, 25) = 5 - Both share a factor of 5; LCM = 75
  • GCF(8, 12) = 4 - Both share 2^2; LCM = 24
  • GCF(7, 13) = 1 - Primes share no factors (coprime); LCM = 91
  • GCF(48, 60, 36) = 12 - All three share 2^2 x 3; LCM = 720
  • GCF(100, 75) = 25 - Both share 5^2; LCM = 300

Benefits of Using a GCF and LCM Calculator

  • Get both values at once - GCF and LCM are often needed together, and this tool computes both simultaneously
  • See the prime factorization - Understanding the factor breakdown builds number sense and makes the results meaningful
  • Handle more than two numbers - Finding the GCF or LCM of three or more numbers is tedious by hand but instant with the calculator
  • Simplify fractions correctly - Use the GCF to reduce fractions to lowest terms without guessing at common factors
  • Solve real-world scheduling problems - Find when overlapping cycles align using the LCM

Frequently Asked Questions

What is the difference between GCF and LCM?

The GCF is the largest number that divides into all given numbers without a remainder. It is always less than or equal to the smallest input. The LCM is the smallest number that all given numbers divide into evenly. It is always greater than or equal to the largest input. For 6 and 10: GCF = 2, LCM = 30.

What does it mean if the GCF of two numbers is 1?

The numbers are coprime (or relatively prime), meaning they share no prime factors. Examples include 8 and 15, or 7 and 11. When two numbers are coprime, their LCM equals their product: LCM(8, 15) = 120 = 8 x 15.

How do I find the GCF of more than two numbers?

Find the GCF of the first two numbers, then find the GCF of that result with the third number, and so on. For GCF(12, 18, 30): GCF(12, 18) = 6, then GCF(6, 30) = 6. Alternatively, use prime factorization of all numbers and take the shared primes at their lowest powers.

What is the relationship between GCF and LCM?

For any two positive integers a and b: GCF(a, b) x LCM(a, b) = a x b. This means if you know the GCF, you can find the LCM by computing (a x b) / GCF, and vice versa. This relationship only holds directly for two numbers; for three or more, the formula is more complex.

How is GCF used to simplify fractions?

Divide both the numerator and denominator by their GCF. To simplify 24/36: GCF(24, 36) = 12. Divide both by 12: 24/12 = 2, 36/12 = 3. So 24/36 = 2/3 in lowest terms. This guarantees the fraction cannot be reduced further.

What are some real-world applications of LCM?

Imagine two traffic lights that cycle every 45 seconds and 60 seconds respectively. They will both turn green simultaneously every LCM(45, 60) = 180 seconds, or every 3 minutes. Similarly, if you buy hot dog buns in packs of 8 and hot dogs in packs of 6, you need LCM(8, 6) = 24 of each for no leftovers.

Compare your options

Decide with evidence, not a sales pitch.

Open a neutral research prompt in the AI tool you already use. Compare capabilities, limitations, and fit before you choose.

  1. 01ChatGPTOpen a balanced comparison prompt in ChatGPT.
  2. 02ClaudeOpen the same research prompt in Claude.
  3. 03PerplexityResearch the comparison with linked web sources.

AI answers can be incomplete. Check source links, current pricing, and product documentation before deciding.

More Calculators