Code tool

LCM Calculator

Enter two integers to find their least common multiple.

In-browser processingNo account requiredPrivacy details ↗

A QUICK WALKTHROUGH

How to use this tool

  1. Enter two integers.
  2. Choose Calculate.
  3. Read the LCM result.

Integer inputs

Accepts signed safe integers; the LCM is zero when either value is zero. Inputs are safe integers, but if the mathematical LCM exceeds the JavaScript safe-integer range, Number cannot guarantee exact units digits.

GOOD TO KNOW

Common questions

What is lcm(0, n)?

It is 0 by convention.