Finance & Math

GCD & LCM Calculator

Find the greatest common divisor and least common multiple

Reviewed: AnyCalc Editorial|2026-07-19|Editorial policy|About

What this calculator does

A GCD and LCM calculator finds the Greatest Common Divisor and Least Common Multiple of two or more numbers — two fundamental operations in number theory with wide practical applications. The GCD (also called Greatest Common Factor or Highest Common Factor) is the largest number that divides all given numbers evenly, calculated efficiently using the Euclidean algorithm: GCD(a, b) = GCD(b, a mod b), repeated until the remainder is 0. The LCM is the smallest number that all given numbers divide into evenly, and is related to GCD by the formula LCM(a, b) = |a × b| / GCD(a, b). For example, GCD(24, 36) = 12 and LCM(24, 36) = 72. These calculations are used for simplifying fractions (GCD divides both numerator and denominator), finding common denominators (LCM), solving scheduling problems (when will two recurring events coincide?), gear ratio calculations, and music theory (rhythm patterns). The Euclidean algorithm makes this calculator efficient even for very large numbers. Enter two or more numbers to instantly see both GCD and LCM along with the prime factorization of each number.

GCD & LCM Calculator

How to use

  1. 01
    Enter your numbers
    Input two or more integers you want to analyze.
  2. 02
    Click Calculate
    Press Calculate to find the GCD and LCM.
  3. 03
    View the solution
    See the GCD, LCM, and prime factorization of each number.

GCD & LCM Calculator FAQ

What is the easiest way to find the GCD?
The Euclidean algorithm is the fastest method: repeatedly divide the larger number by the smaller and replace the larger with the remainder. For GCD(48, 18): 48 ÷ 18 = 2 remainder 12, then 18 ÷ 12 = 1 remainder 6, then 12 ÷ 6 = 2 remainder 0. The last non-zero remainder (6) is the GCD.
How do I find the LCM of two numbers?
The easiest formula is LCM(a, b) = (a × b) / GCD(a, b). For example, LCM(12, 18) = (12 × 18) / GCD(12, 18) = 216 / 6 = 36. For three or more numbers, find the LCM of the first two, then find the LCM of that result with the next number, and continue until all numbers are included.
What is the difference between GCD and LCM?
GCD finds the largest number that divides into all your numbers (going down), while LCM finds the smallest number that all your numbers divide into (going up). GCD is always less than or equal to the smallest number, while LCM is always greater than or equal to the largest. They are inversely related: GCD × LCM = a × b for two numbers.
When do I need GCD and LCM in real life?
GCD helps simplify fractions (e.g., reducing 24/36 to 2/3), split items into equal groups, and determine tile sizes for flooring. LCM solves scheduling problems (two buses departing every 12 and 18 minutes meet every 36 minutes), finding common denominators for adding fractions, and synchronization problems.

Interpret carefully

Outputs are decision-support estimates, not a substitute for professional judgment.

  • Treating GCD & LCM Calculator output as a final professional diagnosis, quote, or legal determination
  • Entering approximate values when the result is sensitive to units or precision
  • Applying the FAQ answer (“What is the easiest way to find the GCD?”) to a special case without checking assumptions

Next steps

  1. Double-check inputs against your source documents (labs, statements, specs, or notes).
  2. Confirm the method below matches your use case before you act on the number.
  3. For medical, financial, or production decisions, verify with a qualified professional.

Disclaimer: Results are informational only and do not constitute medical, financial, legal, or professional advice. Report issues: sublimernj@gmail.com