📐
✓ Editorially reviewed by Derek Giordano, Founder & Editor · BA Business Marketing

LCM & GCF Calculator

LCM, GCF & Factors

Last reviewed: May 2026

🧮
500 calculators, no signup required
Finance · Health · Math · Science · Business
nnng.com

LCM & GCF Calculator

Find the LCM and GCF (GCD) of any set of numbers. LCM: adding fractions, scheduling cycles. GCF: simplifying fractions, dividing evenly.1

Examples

NumbersGCFLCM
6, 8224
12, 18636
15, 25575
24, 361272

Understanding LCM and GCF

The Greatest Common Factor (GCF) — also called Greatest Common Divisor (GCD) — is the largest number that divides evenly into two or more numbers. The Least Common Multiple (LCM) is the smallest number that is a multiple of two or more numbers. These concepts are fundamental to fraction arithmetic, number theory, and practical problems involving cycles and grouping.

How to Calculate GCF

Listing factors method: List all factors of each number and find the largest shared one. Factors of 36: 1, 2, 3, 4, 6, 9, 12, 18, 36. Factors of 48: 1, 2, 3, 4, 6, 8, 12, 16, 24, 48. Shared factors: 1, 2, 3, 4, 6, 12. GCF = 12.

Prime factorization: Break each number into primes. 36 = 2² × 3². 48 = 2⁴ × 3¹. GCF = product of shared primes at their lowest power: 2² × 3¹ = 12.

Euclidean algorithm: The most efficient method for large numbers. Repeatedly divide the larger by smaller and take the remainder. GCF(48, 36): 48 ÷ 36 = 1 remainder 12. 36 ÷ 12 = 3 remainder 0. GCF = 12. This algorithm is over 2,300 years old and remains the basis for modern computational GCF algorithms.

How to Calculate LCM

Using GCF: LCM(a, b) = (a × b) ÷ GCF(a, b). LCM(36, 48) = (36 × 48) ÷ 12 = 1,728 ÷ 12 = 144.

Prime factorization: Take each prime at its highest power. 36 = 2² × 3². 48 = 2⁴ × 3¹. LCM = 2⁴ × 3² = 16 × 9 = 144.

Listing multiples: Multiples of 36: 36, 72, 108, 144... Multiples of 48: 48, 96, 144... First shared multiple = 144.

Practical Applications

Adding fractions: To add ⁵⁄₃₆ + ⁷⁄₄₈, you need a common denominator — the LCM of 36 and 48 is 144. Convert: 20/144 + 21/144 = 41/144. Simplifying fractions: To simplify 36/48, divide both by the GCF (12): 36/48 = 3/4. Scheduling: If Event A repeats every 12 days and Event B every 18 days, they coincide every LCM(12, 18) = 36 days. Gear ratios: Finding gear tooth counts that produce specific ratios uses GCF to determine the simplest ratio. Tiling: Fitting tiles of different sizes into a rectangular area requires the LCM of the tile dimensions to determine the smallest repeating pattern.

Special Cases and Properties

GCF of any number and 1 is always 1. GCF of any number and itself is the number itself. If GCF(a, b) = 1, the numbers are "coprime" or "relatively prime" — they share no factors. Consecutive integers are always coprime. LCM of coprime numbers equals their product: LCM(7, 9) = 63 = 7 × 9. For multiple numbers: GCF(a, b, c) = GCF(GCF(a, b), c) — apply iteratively. The relationship GCF × LCM = product holds only for two numbers, not three or more.

GCF and LCM in Advanced Mathematics

GCF and LCM extend beyond arithmetic into algebra and number theory. Polynomial GCF: Factoring the GCF from polynomial terms is a fundamental algebraic technique. The GCF of 12x³y² and 18x²y⁴ is 6x²y². Bezout's identity: For any integers a and b with GCF d, there exist integers x and y such that ax + by = d. This theorem underlies the Extended Euclidean Algorithm, which is fundamental to RSA encryption. Chinese Remainder Theorem: Uses LCM to solve systems of modular equations — essential in cryptography and computer science.

Computational Efficiency

For large numbers, the Euclidean algorithm is dramatically faster than prime factorization. Finding GCF(1,234,567 and 7,654,321) by listing factors would take millions of comparisons. The Euclidean algorithm solves it in about 8 division steps. This efficiency matters in cryptography where numbers have hundreds of digits. The Extended Euclidean Algorithm runs in O(log(min(a,b))) time — logarithmic, making it efficient even for numbers with thousands of digits. Modern processors include hardware-optimized GCF instructions for cryptographic applications.

Teaching GCF/LCM to Students

Common learning approaches: Factor trees — visually break numbers into prime factors, then compare. Ladder method (cake method) — divide both numbers simultaneously by common factors, stacking divisions like layers. Venn diagrams — place prime factors in overlapping circles; the intersection shows shared factors (GCF), and the union shows all factors (LCM). The most common student error: confusing GCF with LCM — the GCF is always ≤ the smaller number, while the LCM is always ≥ the larger number. If your answer for GCF is bigger than either input, you've calculated LCM instead.

LCM and GCF in Real Life

The least common multiple solves synchronization problems that appear everywhere in daily life. Two bus routes depart from the same stop: Route A every 12 minutes, Route B every 18 minutes. If both leave at 7:00 AM, they next coincide at the LCM of 12 and 18 — which is 36 minutes later, at 7:36 AM. Shift scheduling works the same way: if Employee A works every 3 days and Employee B works every 4 days, they share a shift every LCM(3,4) = 12 days. Event planners use LCM to coordinate repeating activities: if one conference runs biannually and another triennially, they overlap every LCM(2,3) = 6 years. The greatest common factor solves distribution problems: dividing 24 roses and 36 tulips into identical bouquets without leftovers requires GCF(24,36) = 12 bouquets, each with 2 roses and 3 tulips.

The Euclidean Algorithm: How GCF Is Calculated

The most efficient method for finding the GCF of two numbers is the Euclidean algorithm, developed over 2,300 years ago and still used in modern computers. The process repeatedly divides the larger number by the smaller and takes the remainder until the remainder is zero. For GCF(252, 105): 252 ÷ 105 = 2 remainder 42. Then 105 ÷ 42 = 2 remainder 21. Then 42 ÷ 21 = 2 remainder 0. The last non-zero remainder (21) is the GCF. This works because any common factor of two numbers must also be a factor of their difference, and therefore of their remainder upon division. The algorithm handles enormously large numbers efficiently — finding the GCF of two 100-digit numbers takes at most about 480 division steps, finishing in microseconds on modern hardware. Once you have the GCF, the LCM follows from the relationship: LCM(a,b) = (a × b) ÷ GCF(a,b). For 252 and 105: LCM = (252 × 105) ÷ 21 = 1,260.

LCM in Fraction Arithmetic

Adding or subtracting fractions with different denominators requires the LCD (least common denominator), which is the LCM of the denominators. To add 5/12 + 7/18: find LCM(12,18) = 36. Convert: 5/12 = 15/36 and 7/18 = 14/36. Add: 15/36 + 14/36 = 29/36. Without finding the LCM, you could use any common multiple — like 12 × 18 = 216 — but working with unnecessarily large numbers increases arithmetic errors and requires more simplification afterward. The GCF simplifies fractions: 84/126 reduces by dividing both by GCF(84,126) = 42, giving 2/3. Recognizing GCF and LCM relationships makes fraction work significantly faster and less error-prone, which is why these concepts are foundational in pre-algebra and carry through into algebra, calculus, and abstract mathematics.

Applications in Engineering and Computer Science

GCF and LCM appear throughout technical fields in ways that might not be immediately obvious. In gear systems, the gear ratio is simplified using the GCF: a 48-tooth gear driving a 36-tooth gear has a ratio of 48:36, which reduces by GCF(48,36) = 12 to 4:3. In music, rhythm patterns that repeat at different intervals create polyrhythms: a 3-beat pattern against a 4-beat pattern realigns every LCM(3,4) = 12 beats. Computer scientists use the GCF (called GCD — greatest common divisor — in programming) in the RSA encryption algorithm that secures online banking and email: key generation requires finding numbers that are coprime (GCD = 1) to a product of large primes. Display technology uses LCM for refresh rate synchronization: matching a 24 fps video source with a 60 Hz display requires LCM(24,60) = 120 Hz — which is why 120 Hz displays show film content more smoothly than 60 Hz screens, as each frame displays for an exact integer number of refresh cycles rather than requiring uneven 3-2 pulldown patterns.

GCF?
Largest shared factor. GCF(12,18)=6.

LCM and GCF in Real Life

The least common multiple solves synchronization problems that appear everywhere in daily life. Two bus routes depart from the same stop: Route A every 12 minutes, Route B every 18 minutes. If both leave at 7:00 AM, they next coincide at the LCM of 12 and 18 — which is 36 minutes later, at 7:36 AM. Shift scheduling works the same way: if Employee A works every 3 days and Employee B works every 4 days, they share a shift every LCM(3,4) = 12 days. Event planners use LCM to coordinate repeating activities: if one conference runs biannually and another triennially, they overlap every LCM(2,3) = 6 years. The greatest common factor solves distribution problems: dividing 24 roses and 36 tulips into identical bouquets without leftovers requires GCF(24,36) = 12 bouquets, each with 2 roses and 3 tulips.

The Euclidean Algorithm: How GCF Is Calculated

The most efficient method for finding the GCF of two numbers is the Euclidean algorithm, developed over 2,300 years ago and still used in modern computers. The process repeatedly divides the larger number by the smaller and takes the remainder until the remainder is zero. For GCF(252, 105): 252 ÷ 105 = 2 remainder 42. Then 105 ÷ 42 = 2 remainder 21. Then 42 ÷ 21 = 2 remainder 0. The last non-zero remainder (21) is the GCF. This works because any common factor of two numbers must also be a factor of their difference, and therefore of their remainder upon division. The algorithm handles enormously large numbers efficiently — finding the GCF of two 100-digit numbers takes at most about 480 division steps, finishing in microseconds on modern hardware. Once you have the GCF, the LCM follows from the relationship: LCM(a,b) = (a × b) ÷ GCF(a,b). For 252 and 105: LCM = (252 × 105) ÷ 21 = 1,260.

LCM in Fraction Arithmetic

Adding or subtracting fractions with different denominators requires the LCD (least common denominator), which is the LCM of the denominators. To add 5/12 + 7/18: find LCM(12,18) = 36. Convert: 5/12 = 15/36 and 7/18 = 14/36. Add: 15/36 + 14/36 = 29/36. Without finding the LCM, you could use any common multiple — like 12 × 18 = 216 — but working with unnecessarily large numbers increases arithmetic errors and requires more simplification afterward. The GCF simplifies fractions: 84/126 reduces by dividing both by GCF(84,126) = 42, giving 2/3. Recognizing GCF and LCM relationships makes fraction work significantly faster and less error-prone, which is why these concepts are foundational in pre-algebra and carry through into algebra, calculus, and abstract mathematics.

Applications in Engineering and Computer Science

GCF and LCM appear throughout technical fields in ways that might not be immediately obvious. In gear systems, the gear ratio is simplified using the GCF: a 48-tooth gear driving a 36-tooth gear has a ratio of 48:36, which reduces by GCF(48,36) = 12 to 4:3. In music, rhythm patterns that repeat at different intervals create polyrhythms: a 3-beat pattern against a 4-beat pattern realigns every LCM(3,4) = 12 beats. Computer scientists use the GCF (called GCD — greatest common divisor — in programming) in the RSA encryption algorithm that secures online banking and email: key generation requires finding numbers that are coprime (GCD = 1) to a product of large primes. Display technology uses LCM for refresh rate synchronization: matching a 24 fps video source with a 60 Hz display requires LCM(24,60) = 120 Hz — which is why 120 Hz displays show film content more smoothly than 60 Hz screens, as each frame displays for an exact integer number of refresh cycles rather than requiring uneven 3-2 pulldown patterns.

LCM?
Smallest shared multiple. LCM(4,6)=12. See Fraction Calculator.2

LCM and GCF in Real Life

The least common multiple solves synchronization problems that appear everywhere in daily life. Two bus routes depart from the same stop: Route A every 12 minutes, Route B every 18 minutes. If both leave at 7:00 AM, they next coincide at the LCM of 12 and 18 — which is 36 minutes later, at 7:36 AM. Shift scheduling works the same way: if Employee A works every 3 days and Employee B works every 4 days, they share a shift every LCM(3,4) = 12 days. Event planners use LCM to coordinate repeating activities: if one conference runs biannually and another triennially, they overlap every LCM(2,3) = 6 years. The greatest common factor solves distribution problems: dividing 24 roses and 36 tulips into identical bouquets without leftovers requires GCF(24,36) = 12 bouquets, each with 2 roses and 3 tulips.

The Euclidean Algorithm: How GCF Is Calculated

The most efficient method for finding the GCF of two numbers is the Euclidean algorithm, developed over 2,300 years ago and still used in modern computers. The process repeatedly divides the larger number by the smaller and takes the remainder until the remainder is zero. For GCF(252, 105): 252 ÷ 105 = 2 remainder 42. Then 105 ÷ 42 = 2 remainder 21. Then 42 ÷ 21 = 2 remainder 0. The last non-zero remainder (21) is the GCF. This works because any common factor of two numbers must also be a factor of their difference, and therefore of their remainder upon division. The algorithm handles enormously large numbers efficiently — finding the GCF of two 100-digit numbers takes at most about 480 division steps, finishing in microseconds on modern hardware. Once you have the GCF, the LCM follows from the relationship: LCM(a,b) = (a × b) ÷ GCF(a,b). For 252 and 105: LCM = (252 × 105) ÷ 21 = 1,260.

LCM in Fraction Arithmetic

Adding or subtracting fractions with different denominators requires the LCD (least common denominator), which is the LCM of the denominators. To add 5/12 + 7/18: find LCM(12,18) = 36. Convert: 5/12 = 15/36 and 7/18 = 14/36. Add: 15/36 + 14/36 = 29/36. Without finding the LCM, you could use any common multiple — like 12 × 18 = 216 — but working with unnecessarily large numbers increases arithmetic errors and requires more simplification afterward. The GCF simplifies fractions: 84/126 reduces by dividing both by GCF(84,126) = 42, giving 2/3. Recognizing GCF and LCM relationships makes fraction work significantly faster and less error-prone, which is why these concepts are foundational in pre-algebra and carry through into algebra, calculus, and abstract mathematics.

Applications in Engineering and Computer Science

GCF and LCM appear throughout technical fields in ways that might not be immediately obvious. In gear systems, the gear ratio is simplified using the GCF: a 48-tooth gear driving a 36-tooth gear has a ratio of 48:36, which reduces by GCF(48,36) = 12 to 4:3. In music, rhythm patterns that repeat at different intervals create polyrhythms: a 3-beat pattern against a 4-beat pattern realigns every LCM(3,4) = 12 beats. Computer scientists use the GCF (called GCD — greatest common divisor — in programming) in the RSA encryption algorithm that secures online banking and email: key generation requires finding numbers that are coprime (GCD = 1) to a product of large primes. Display technology uses LCM for refresh rate synchronization: matching a 24 fps video source with a 60 Hz display requires LCM(24,60) = 120 Hz — which is why 120 Hz displays show film content more smoothly than 60 Hz screens, as each frame displays for an exact integer number of refresh cycles rather than requiring uneven 3-2 pulldown patterns.

GCF via primes?
Shared primes at lowest power.3

LCM and GCF in Real Life

The least common multiple solves synchronization problems that appear everywhere in daily life. Two bus routes depart from the same stop: Route A every 12 minutes, Route B every 18 minutes. If both leave at 7:00 AM, they next coincide at the LCM of 12 and 18 — which is 36 minutes later, at 7:36 AM. Shift scheduling works the same way: if Employee A works every 3 days and Employee B works every 4 days, they share a shift every LCM(3,4) = 12 days. Event planners use LCM to coordinate repeating activities: if one conference runs biannually and another triennially, they overlap every LCM(2,3) = 6 years. The greatest common factor solves distribution problems: dividing 24 roses and 36 tulips into identical bouquets without leftovers requires GCF(24,36) = 12 bouquets, each with 2 roses and 3 tulips.

The Euclidean Algorithm: How GCF Is Calculated

The most efficient method for finding the GCF of two numbers is the Euclidean algorithm, developed over 2,300 years ago and still used in modern computers. The process repeatedly divides the larger number by the smaller and takes the remainder until the remainder is zero. For GCF(252, 105): 252 ÷ 105 = 2 remainder 42. Then 105 ÷ 42 = 2 remainder 21. Then 42 ÷ 21 = 2 remainder 0. The last non-zero remainder (21) is the GCF. This works because any common factor of two numbers must also be a factor of their difference, and therefore of their remainder upon division. The algorithm handles enormously large numbers efficiently — finding the GCF of two 100-digit numbers takes at most about 480 division steps, finishing in microseconds on modern hardware. Once you have the GCF, the LCM follows from the relationship: LCM(a,b) = (a × b) ÷ GCF(a,b). For 252 and 105: LCM = (252 × 105) ÷ 21 = 1,260.

LCM in Fraction Arithmetic

Adding or subtracting fractions with different denominators requires the LCD (least common denominator), which is the LCM of the denominators. To add 5/12 + 7/18: find LCM(12,18) = 36. Convert: 5/12 = 15/36 and 7/18 = 14/36. Add: 15/36 + 14/36 = 29/36. Without finding the LCM, you could use any common multiple — like 12 × 18 = 216 — but working with unnecessarily large numbers increases arithmetic errors and requires more simplification afterward. The GCF simplifies fractions: 84/126 reduces by dividing both by GCF(84,126) = 42, giving 2/3. Recognizing GCF and LCM relationships makes fraction work significantly faster and less error-prone, which is why these concepts are foundational in pre-algebra and carry through into algebra, calculus, and abstract mathematics.

Applications in Engineering and Computer Science

GCF and LCM appear throughout technical fields in ways that might not be immediately obvious. In gear systems, the gear ratio is simplified using the GCF: a 48-tooth gear driving a 36-tooth gear has a ratio of 48:36, which reduces by GCF(48,36) = 12 to 4:3. In music, rhythm patterns that repeat at different intervals create polyrhythms: a 3-beat pattern against a 4-beat pattern realigns every LCM(3,4) = 12 beats. Computer scientists use the GCF (called GCD — greatest common divisor — in programming) in the RSA encryption algorithm that secures online banking and email: key generation requires finding numbers that are coprime (GCD = 1) to a product of large primes. Display technology uses LCM for refresh rate synchronization: matching a 24 fps video source with a 60 Hz display requires LCM(24,60) = 120 Hz — which is why 120 Hz displays show film content more smoothly than 60 Hz screens, as each frame displays for an exact integer number of refresh cycles rather than requiring uneven 3-2 pulldown patterns.

LCM via primes?
All primes at highest power.

LCM and GCF in Real Life

The least common multiple solves synchronization problems that appear everywhere in daily life. Two bus routes depart from the same stop: Route A every 12 minutes, Route B every 18 minutes. If both leave at 7:00 AM, they next coincide at the LCM of 12 and 18 — which is 36 minutes later, at 7:36 AM. Shift scheduling works the same way: if Employee A works every 3 days and Employee B works every 4 days, they share a shift every LCM(3,4) = 12 days. Event planners use LCM to coordinate repeating activities: if one conference runs biannually and another triennially, they overlap every LCM(2,3) = 6 years. The greatest common factor solves distribution problems: dividing 24 roses and 36 tulips into identical bouquets without leftovers requires GCF(24,36) = 12 bouquets, each with 2 roses and 3 tulips.

The Euclidean Algorithm: How GCF Is Calculated

The most efficient method for finding the GCF of two numbers is the Euclidean algorithm, developed over 2,300 years ago and still used in modern computers. The process repeatedly divides the larger number by the smaller and takes the remainder until the remainder is zero. For GCF(252, 105): 252 ÷ 105 = 2 remainder 42. Then 105 ÷ 42 = 2 remainder 21. Then 42 ÷ 21 = 2 remainder 0. The last non-zero remainder (21) is the GCF. This works because any common factor of two numbers must also be a factor of their difference, and therefore of their remainder upon division. The algorithm handles enormously large numbers efficiently — finding the GCF of two 100-digit numbers takes at most about 480 division steps, finishing in microseconds on modern hardware. Once you have the GCF, the LCM follows from the relationship: LCM(a,b) = (a × b) ÷ GCF(a,b). For 252 and 105: LCM = (252 × 105) ÷ 21 = 1,260.

LCM in Fraction Arithmetic

Adding or subtracting fractions with different denominators requires the LCD (least common denominator), which is the LCM of the denominators. To add 5/12 + 7/18: find LCM(12,18) = 36. Convert: 5/12 = 15/36 and 7/18 = 14/36. Add: 15/36 + 14/36 = 29/36. Without finding the LCM, you could use any common multiple — like 12 × 18 = 216 — but working with unnecessarily large numbers increases arithmetic errors and requires more simplification afterward. The GCF simplifies fractions: 84/126 reduces by dividing both by GCF(84,126) = 42, giving 2/3. Recognizing GCF and LCM relationships makes fraction work significantly faster and less error-prone, which is why these concepts are foundational in pre-algebra and carry through into algebra, calculus, and abstract mathematics.

Applications in Engineering and Computer Science

GCF and LCM appear throughout technical fields in ways that might not be immediately obvious. In gear systems, the gear ratio is simplified using the GCF: a 48-tooth gear driving a 36-tooth gear has a ratio of 48:36, which reduces by GCF(48,36) = 12 to 4:3. In music, rhythm patterns that repeat at different intervals create polyrhythms: a 3-beat pattern against a 4-beat pattern realigns every LCM(3,4) = 12 beats. Computer scientists use the GCF (called GCD — greatest common divisor — in programming) in the RSA encryption algorithm that secures online banking and email: key generation requires finding numbers that are coprime (GCD = 1) to a product of large primes. Display technology uses LCM for refresh rate synchronization: matching a 24 fps video source with a 60 Hz display requires LCM(24,60) = 120 Hz — which is why 120 Hz displays show film content more smoothly than 60 Hz screens, as each frame displays for an exact integer number of refresh cycles rather than requiring uneven 3-2 pulldown patterns.

LCM×GCF = a×b?
Yes for two numbers. Quick verification.4

How to Use This Calculator

  1. Enter numbers — Two or more.
  2. Calculate — GCF and LCM instantly.
  3. See factors — Prime factorization shown.

Tips and Best Practices

GCF simplifies fractions. Divide both parts by GCF.

LCM = LCD for fractions. Least Common Denominator = LCM of denominators.

LCM for scheduling. Events every 3 and 5 days coincide every 15.

GCF×LCM = product. Quick check for two numbers.

See also: Fraction · Prime Number · Ratio

📚 Sources & References
  1. [1] Khan Academy. "LCM/GCF." KhanAcademy.org
  2. [2] Wolfram. "GCD." MathWorld
  3. [3] NCTM. "Number Theory." NCTM.org
  4. [4] OpenStax. "Factors." OpenStax.org
Editorial Standards — Every calculator is built from peer-reviewed formulas and official data sources, editorially reviewed for accuracy, and updated regularly. Read our full methodology · About the author