Skip to main content
math

LCM Calculator (Least Common Multiple)

Calculate the Least Common Multiple (LCM) of two or more integers. The LCM is the smallest positive integer divisible by all given numbers.

Reviewed by Chase FloiedUpdated

This free online lcm calculator (least common multiple) provides instant results with no signup required. All calculations run directly in your browser — your data is never sent to a server. Enter your values below and see results update in real time as you type. Perfect for everyday calculations, homework, or professional use.

How to Use This Calculator

1

Enter your input values

Fill in all required input fields for the LCM Calculator (Least Common Multiple). Most fields include unit selectors so you can work in your preferred unit system — metric or imperial, whichever matches your problem.

2

Review your inputs

Double-check that all values are correct and that you have selected the right units for each field. Incorrect units are the most common source of calculation errors and can produce results that are off by factors of 2, 10, or more.

3

Read the results

The LCM Calculator (Least Common Multiple) instantly computes the output and displays results with units clearly labeled. All calculations happen in your browser — no loading time and no data sent to a server.

4

Explore parameter sensitivity

Try adjusting individual input values to see how the output changes. This is a quick and effective way to develop intuition about how different parameters influence the result and to identify which inputs have the largest effect.

Formula Reference

LCM Calculator (Least Common Multiple) Formula

See calculator inputs for the governing equation

Variables: All variables and their units are labeled in the calculator interface above. Input fields accept values in multiple unit systems — select your preferred unit from the dropdown next to each field.

When to Use This Calculator

  • Use the LCM Calculator (Least Common Multiple) when you need a quick mathematical result without writing out all the steps manually, saving time on repetitive calculations.
  • Use it to verify hand calculations on tests or assignments and catch arithmetic mistakes.
  • Use it when teaching or explaining mathematical concepts to others, demonstrating how changing inputs affects the result.
  • Use it to explore the behavior of mathematical functions across a range of inputs.

About This Calculator

The LCM Calculator (Least Common Multiple) is a free mathematical calculation tool for students, educators, and professionals who need quick, reliable results. Calculate the Least Common Multiple (LCM) of two or more integers. The LCM is the smallest positive integer divisible by all given numbers. The underlying algorithms implement well-established mathematical formulas and numerical methods. Results are computed instantly in the browser. This tool is useful for learning, verification of hand calculations, and rapid exploration of mathematical relationships. All computation happens locally — no data is sent to a server.

About LCM Calculator (Least Common Multiple)

The Least Common Multiple (LCM) of two or more integers is the smallest positive integer that is evenly divisible by each of the given numbers. The LCM is essential in adding and subtracting fractions with different denominators — you need the LCM of the denominators to find the common denominator. It also appears in scheduling problems (finding when events with different periods coincide), gear ratios, and music theory (determining when rhythmic patterns realign). The most efficient method to compute LCM uses the relationship lcm(a, b) = |a × b| / gcd(a, b), leveraging the fast Euclidean algorithm for GCD. The LCM can also be computed from prime factorizations by taking the maximum power of each prime factor appearing in any of the numbers. LCM extends naturally to more than two numbers: lcm(a, b, c) = lcm(lcm(a, b), c).

The Math Behind It

The LCM is defined as the smallest positive integer m such that a | m and b | m (both a and b divide m). Equivalently, using prime factorization, if a = p₁^a₁ × p₂^a₂ × ... and b = p₁^b₁ × p₂^b₂ × ..., then lcm(a, b) = p₁^max(a₁,b₁) × p₂^max(a₂,b₂) × .... The fundamental identity gcd(a, b) × lcm(a, b) = |a × b| connects the two operations, and since GCD is efficient to compute, this gives an efficient LCM algorithm. Properties include: lcm(a, b) = lcm(b, a), lcm(a, lcm(b, c)) = lcm(lcm(a, b), c), lcm(a, a) = |a|, lcm(a, 1) = |a|, and a | lcm(a, b). The LCM and GCD together form a lattice structure on the positive integers. In ring theory, the LCM of two ideals generalizes this concept. For finding common denominators: a/p + b/q = (a × (L/p) + b × (L/q)) / L, where L = lcm(p, q).

Formula Reference

LCM Formula

lcm(a, b) = |a × b| / gcd(a, b)

Variables: a, b = positive integers

Worked Examples

Example 1: LCM of 12 and 18

Find LCM(12, 18)

Step 1:Find GCF: 18 = 12 × 1 + 6, 12 = 6 × 2 + 0, so GCF = 6
Step 2:LCM = |12 × 18| / 6 = 216 / 6 = 36

LCM(12, 18) = 36

Example 2: LCM Using Prime Factorization

Find LCM(15, 20)

Step 1:15 = 3 × 5, 20 = 2² × 5
Step 2:Take max power of each prime: 2², 3, 5
Step 3:LCM = 4 × 3 × 5 = 60

LCM(15, 20) = 60

Common Mistakes & Tips

  • !Confusing LCM with GCF — LCM is always ≥ max(a, b), while GCF is always ≤ min(a, b).
  • !Multiplying the numbers without dividing by GCF — a × b is a common multiple but usually not the least.
  • !Forgetting LCM(a, 0) is typically defined as 0, not a.

Related Concepts

Used in These Calculators

Calculators that build on or apply the concepts from this page:

Frequently Asked Questions

Why is LCM useful for adding fractions?

To add fractions like 1/4 + 1/6, you need a common denominator. LCM(4, 6) = 12, giving 3/12 + 2/12 = 5/12. Using the LCM minimizes the size of the denominator.

Can LCM be computed for more than two numbers?

Yes. Apply LCM iteratively: LCM(a, b, c) = LCM(LCM(a, b), c). This works for any number of integers.