GCF & LCM

Other Tools

Calculate greatest common factor and least common multiple

The greatest common factor (GCF) and least common multiple (LCM) are two of the most frequently needed number theory calculations in math class and beyond — used for simplifying fractions, finding common denominators, scheduling recurring events, and solving word problems. Finding them by hand for small numbers is easy, but for larger numbers or more than two values, manual prime factorization or listing multiples becomes tedious and error-prone. This calculator finds both instantly for any set of numbers.

The GCF (also called the greatest common divisor or highest common factor) is the largest number that divides evenly into all the given numbers, and it's essential for simplifying fractions and ratios to their lowest terms. The LCM is the smallest number that all the given numbers divide into evenly, and it's essential for adding or subtracting fractions with different denominators, or for solving 'when will these events align again' scheduling problems.

This tool works for two numbers or more, showing the calculation clearly so students can verify their homework or understand the underlying method (whether prime factorization or the Euclidean algorithm) rather than just getting an answer. Whether you're simplifying a stubborn fraction, finding a common denominator, or solving a real-world scheduling puzzle, GCF and LCM calculations are foundational tools worth having on hand.

Why GCF & LCM Matters

GCF and LCM aren't just abstract math class exercises — they solve real practical problems in fractions, scheduling, and resource allocation.

Simplifying fractions: To reduce a fraction like 24/36 to lowest terms, you divide both numerator and denominator by their GCF (12), giving 2/3. This is essential for clean, readable answers in math and everyday calculations.

Adding fractions with different denominators: To add 1/4 + 1/6, you need a common denominator, which is the LCM of 4 and 6 (12). Finding the LCM correctly avoids using an unnecessarily large denominator that then requires extra simplification.

Scheduling and recurring events: If one event repeats every 6 days and another every 8 days, the LCM (24) tells you how many days until both events coincide again — useful for planning shift schedules, bus routes, or recurring tasks.

Dividing items into equal groups: The GCF helps determine the largest possible equal group size when dividing different quantities of items evenly, such as packing 48 apples and 60 oranges into identical gift baskets with no leftovers.

The GCF & LCM Formula, Explained

GCF(a,b) via Euclidean algorithm; LCM(a,b) = (a × b) ÷ GCF(a,b)

The Euclidean algorithm finds the GCF efficiently: divide the larger number by the smaller, take the remainder, then repeat the process using the smaller number and the remainder until the remainder is 0. The last non-zero remainder is the GCF.

Once you have the GCF, the LCM follows directly from the relationship: LCM(a,b) = (a × b) ÷ GCF(a,b). This works because the product of two numbers always equals the product of their GCF and LCM.

An alternative method uses prime factorization: break each number into its prime factors, then the GCF is the product of the shared prime factors (using the lowest power of each shared prime), while the LCM is the product of all prime factors involved (using the highest power of each). For three or more numbers, find the GCF or LCM of the first two, then combine that result with the next number, repeating until all numbers are included.

How to Use the GCF & LCM: Step by Step

  1. Enter your numbers

    Input two or more whole numbers you want to find the GCF and LCM for, such as 48 and 60.

  2. Calculate the GCF

    The calculator applies the Euclidean algorithm to find the greatest common factor — the largest number that divides evenly into all your numbers.

  3. Calculate the LCM

    Using the GCF, the calculator finds the least common multiple — the smallest number that all your numbers divide into evenly.

  4. Apply the result

    Use the GCF to simplify fractions or divide items into equal groups, or use the LCM to find common denominators or solve scheduling problems.

GCF & LCM Examples: Real-World Scenarios

1

Simplifying a Fraction Using GCF

A student needs to simplify the fraction 48/60 to its lowest terms and wants to find the GCF of 48 and 60.

First number:48
Second number:60

Calculation

Euclidean algorithm: 60 = 1×48 + 12; 48 = 4×12 + 0. GCF = 12

Result

GCF(48, 60) = 12. Simplifying 48/60 by dividing both by 12 gives 4/5, the fraction in lowest terms. LCM(48, 60) = (48×60)÷12 = 240.

2

Finding a Common Denominator

A student needs to add the fractions 1/18 and 1/24 and must find the least common multiple of 18 and 24 to use as the common denominator.

First number:18
Second number:24

Calculation

GCF(18, 24) = 6. LCM = (18×24)÷6 = 432÷6

Result

LCM(18, 24) = 72. The student converts both fractions to have a denominator of 72 (4/72 + 3/72 = 7/72) to add them.

3

Scheduling Three Recurring Events

Three maintenance tasks repeat every 36, 60, and 90 days respectively. A facilities manager wants to know how many days until all three tasks fall on the same day again.

Numbers:36, 60, and 90 days

Calculation

GCF(36,60) = 12; GCF(12,90) = 6, so GCF of all three = 6. LCM(36,60) = 180; LCM(180,90) = 180

Result

GCF(36, 60, 90) = 6. LCM(36, 60, 90) = 180. All three tasks will coincide again in 180 days.

Common Mistakes to Avoid

  • Confusing GCF and LCM — the GCF is always less than or equal to the smallest number, while the LCM is always greater than or equal to the largest number. If your answer violates this, you've mixed them up.
  • Using an incorrect (non-least) common multiple as a denominator — any common multiple works for adding fractions, but using the LCM keeps the numbers smaller and avoids unnecessary simplification afterward.
  • Forgetting that GCF(a,b) for two numbers with no shared factors other than 1 (coprime numbers) is always 1, not 0 — for example, GCF(9, 16) = 1.
  • For three or more numbers, incorrectly computing GCF/LCM pairwise without combining all results — you must chain the calculation across all numbers, not just the first two.

Tips & Tricks

  • The relationship LCM(a,b) = (a×b)÷GCF(a,b) only applies directly to two numbers at a time; for three or more numbers, compute iteratively by combining results one number at a time.
  • If two numbers share no common factors besides 1 (like 8 and 15), their GCF is 1 and their LCM is simply their product (120).
  • For quick mental estimates, checking if numbers share obvious factors like 2, 3, 5, or 10 first can speed up manual GCF calculations before resorting to full prime factorization.

GCF and LCM calculations are the building blocks behind fraction simplification, common denominators, and scheduling problems, and having a fast, accurate calculator removes the tedium of manual prime factorization for larger numbers. Use the GCF to simplify fractions and ratios to their lowest terms, and the LCM whenever you need a common denominator or need to find when recurring events align. Pair this tool with our ratio calculator or fraction calculator for related everyday math tasks. Math Is Fun and Khan Academy both offer thorough lessons on the underlying number theory.

GCF & LCM — Frequently Asked Questions

Related Calculators

Authoritative References

External links open in a new tab. OmniCalc.us is not affiliated with these organisations.

Related Calculators