LCM Function
Returns the least common multiple of whole numbers.
Category
Math & Trig
Available in
All versions, Microsoft 365
Returns
A whole number
Want to practice LCM in a real spreadsheet? Open a blank sheet in our Practice Sandbox and try it with live data, with the AI Excel tutor beside you. No Excel needed — just a free account.Try it free in the Sandbox
Overview
LCM finds the smallest number that all your numbers divide into: LCM(4, 6) is 12.
It answers “when do these schedules line up again?”.
Syntax
=LCM(number1, [number2], …)
Arguments
| Argument | Required? | What it does |
|---|---|---|
| number1 | Yes | A whole number. |
| number2, … | Optional | More numbers. |
Examples
Example 1 — Delivery schedules
One supplier delivers every 4 days, another every 6. When do both arrive on the same day?
C2fx=LCM(A2, B2)
| A | B | C | |
|---|---|---|---|
| 1 | Supplier A | Supplier B | Together every |
| 2 | 4 | 6 | 12 |
| 3 | 5 | 7 | 35 |
| 4 | 6 | 9 | 18 |
=LCM(A2, B2) Explain
Common mistakes
- Negative numbers. Return #NUM!.
Notes
- Related functions: GCD.

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.