GCF & LCM Calculator

Find the Greatest Common Factor (GCF) and Least Common Multiple (LCM) of any numbers.

Reviewed March 2026 How we build our calculators →
GCF (Greatest Common Factor)
LCM (Least Common Multiple)
Prime Factorizations
Share

GCF and LCM: What They Are and Why They Matter

The Greatest Common Factor (GCF) — also called the Greatest Common Divisor (GCD) or Highest Common Factor (HCF) — is the largest number that divides evenly into all of the given numbers. The Least Common Multiple (LCM) is the smallest number that all of the given numbers divide into evenly. Despite sounding abstract, both show up constantly in practical arithmetic: GCF is essential for simplifying fractions, and LCM is essential for adding fractions with different denominators.

Finding GCF: The Euclidean Algorithm

The most efficient method for finding GCF is the Euclidean algorithm. Divide the larger number by the smaller and find the remainder. Replace the larger number with the smaller, and the smaller with the remainder. Repeat until the remainder is 0 — the last non-zero remainder is the GCF. Example: GCF(48, 18). 48 ÷ 18 = 2 remainder 12. 18 ÷ 12 = 1 remainder 6. 12 ÷ 6 = 2 remainder 0. GCF = 6. This algorithm works extremely efficiently even for very large numbers.

Finding LCM: The Relationship Formula

For any two numbers a and b, LCM(a, b) = (a × b) / GCF(a, b). This elegant relationship means once you know the GCF, the LCM is a quick calculation away. For three or more numbers, find the LCM of the first two, then find the LCM of that result with the third number, and so on.

Frequently Asked Questions

What is the relationship between GCF and LCM?

For any two numbers a and b: GCF(a,b) × LCM(a,b) = a × b. So LCM = (a × b) / GCF. For example, for 12 and 18: GCF is 6, so LCM = (12 × 18) / 6 = 216 / 6 = 36. This relationship only holds for exactly two numbers — for three or more, you must calculate step by step.

How do I use GCF to simplify a fraction?

Divide both the numerator and denominator by their GCF. The fraction 36/48: GCF(36, 48) = 12. Divide both by 12: 36/12 = 3, 48/12 = 4. Simplified fraction: 3/4. If you divide by a common factor that is not the GCF, you get a simpler fraction that still needs further simplification.

How do I use LCM to add fractions?

To add fractions with different denominators, find the LCM of the denominators — this is the Least Common Denominator (LCD). Convert each fraction to that denominator, then add the numerators. To add 1/4 + 1/6: LCM(4, 6) = 12. Convert: 3/12 + 2/12 = 5/12. Using the LCM rather than just multiplying the denominators keeps the numbers smaller.

What is GCF used for in real life?

Splitting things into equal groups without leftovers: if you have 24 apples and 36 oranges and want to make identical gift bags using all the fruit, GCF(24, 36) = 12 tells you that 12 bags is the maximum. Each bag gets 2 apples and 3 oranges. GCF also appears in simplifying ratios, reducing fractions, and finding common scales for measurements.

Can GCF be 1?

Yes — when two numbers share no common factors other than 1, their GCF is 1. Such numbers are called coprime or relatively prime. For example, GCF(8, 15) = 1 because 8 = 2³ and 15 = 3 × 5 share no prime factors. Coprime numbers have LCM equal to their product: LCM(8, 15) = 8 × 15 = 120.

Share
Results are calculated using standard mathematical formulas. While we strive for accuracy, please verify critical calculations independently.
Scroll to Top