Free Tool

GCF & LCM Calculator

Find the GCF and LCM of any numbers.

No signup requiredInstant resultsStep-by-step solutions

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.

Still not sure that Formula Bot is right for you?

Let ChatGPT, Claude, or Perplexity do the thinking for you. Click a button and see what your favorite AI says about Formula Bot.

More Calculators

Free Statistics Calculator Online

Free Derivative Calculator

Free Fraction Calculator Online

Free Unit Converter Online

Free Compound Interest Calculator Online

Free Probability Calculator Online

Free Integral Calculator

Free Complex Number Calculator Online

Free Number Base Converter Online

Free Regression Calculator Online

Free Percentage Calculator Online

Free Limit Calculator

Free Factoring Calculator Online

Free Polynomial Roots Calculator Online

Free Summation Calculator (Sigma Notation)

Free Expression Simplifier

Free Matrix Calculator Online

Free Vector Calculator Online

Free Equation Solver Online

Free Tip Calculator Online

Calculate tips and split bills with ease.

Free GPA Calculator Online

Calculate your grade point average instantly.

Free Square Footage Calculator Online

Calculate area for any shape and convert between units.

Free Square Root Calculator Online

Find square roots with step-by-step solutions.

Free Final Grade Calculator Online

Find out what you need on your final exam.

Free Quadratic Formula Calculator Online

Solve quadratic equations step by step.

Free Pythagorean Theorem Calculator Online

Find the missing side of a right triangle.

Free Annuity Calculator Online

Calculate annuity payments and values.

Free Dividend Calculator Online

Calculate dividend yield and income projections.

Free Long Division Calculator Online

Solve long division with detailed steps.

Age Calculator - Calculate Your Exact Age

Calculate your exact age in years, months, and days.

Slope Calculator - Find Slope from Two Points

Find the slope and equation of a line.

Free Future Value Calculator Online

Calculate how your investments grow over time.

Free Discount Calculator Online

Calculate sale prices and savings instantly.

Free Scientific Notation Calculator Online

Convert and calculate with scientific notation.

Log Calculator - Calculate Logarithms Online

Calculate logarithms with any base.

Free Rounding Calculator Online

Round numbers to any decimal place.

Free Markup Calculator Online

Calculate markup percentage and profit margins.

Free Mixed Number Calculator Online

Add, subtract, multiply, and divide mixed numbers.

Free Exponent Calculator Online

Calculate powers and exponents step by step.

Free Significant Figures Calculator Online

Count and round significant figures.

Free Midpoint Calculator Online

Find the midpoint between two coordinate points.

Free Percent Error Calculator Online

Calculate percent error for experiments and data.

Free Decimal to Fraction Calculator Online

Convert decimals to fractions in lowest terms.

Ready to Solve More Problems?

Sign up for free and unlock unlimited calculations, saved history, and more.

Get Started Free