🔢

LCM & GCF Calculator

Find the Least Common Multiple (LCM) and Greatest Common Factor (GCF/GCD) of two integers using the Euclidean algorithm.

Results

Greatest Common Factor (GCF)6
Least Common Multiple (LCM)36

📖What is it?

The Greatest Common Factor (GCF), also called the Greatest Common Divisor (GCD), is the largest integer that divides both numbers without a remainder. The Least Common Multiple (LCM) is the smallest positive integer divisible by both numbers. They are related by: LCM(a,b) = (a × b) / GCF(a,b).

🎯How to use

Enter two positive integers. The calculator applies two steps of the Euclidean algorithm (successive remainders) to find the GCF, then derives the LCM from the product relationship. For best results, enter integers between 1 and 10,000.

💡Example scenario

GCF(12, 18): 18 = 1×12 + 6, then 12 = 2×6 + 0 → GCF = 6. LCM = (12 × 18) / 6 = 36. This means the smallest grid that fits both a 12-unit and 18-unit ruler without gaps is 36 units.

🏆Pro tip

GCF is essential for simplifying fractions (divide numerator and denominator by GCF). LCM is used to find the Lowest Common Denominator (LCD) when adding fractions. In music, LCM determines when two rhythmic patterns align — e.g., a pattern repeating every 3 beats and one every 4 beats sync every 12 beats.