LCM Calculator
Enter two or more whole numbers and the calculator gives their least common multiple, along with the prime factorisation of each number and the greatest common factor it used on the way. Each line of the working is shown, so you can copy it into homework. Numbers of any length are handled exactly.
How to use the LCM calculator
Result
The working
Enter your numbers above to see the answer and every step.
-
Checked on
Method: standard mathematical definitions and textbook formulas, shown in full in the working.
Worked example
For 4 and 6 the greatest common factor is 2. Dividing the first number by that factor and multiplying by the second gives the least common multiple, 12.
Prime factor method
The steps of the worked example appear here.
Method and conventions
For two numbers the least common multiple equals the first divided by their greatest common factor, times the second. Dividing first keeps the numbers small. For a longer list the calculator folds from left to right. The prime factor method takes every prime at its highest power across the numbers and multiplies them. By convention the least common multiple involving zero is zero, and the page says so.
What it does not cover
- The least common multiple with zero is zero by convention, and some textbooks call it undefined.
- Prime factorisation of very large numbers is skipped, though the answer itself stays exact.
Rules and calculation checked on 11 Oct 2026.
Questions people ask
How to find HCF and LCM on a calculator?
Enter your numbers on this page for the LCM, and use the GCF page for the HCF; they are the same thing as the greatest common factor. The LCM comes from the HCF by dividing one number by it and multiplying by the other, as the example above shows with an answer of 12.
How to find the LCM using a calculator?
Type the numbers into the box and read the result with its steps. By hand you can list the prime factors of each number and multiply every prime at its highest power, which gives the same answer as the formula using the greatest common factor.
What is the LCM calculator?
It finds the smallest positive whole number that every number in your list divides exactly. This version also shows the prime factorisations and the greatest common factor, so you can follow the method used in school rather than only read an answer.
Related calculators
Add, subtract, multiply or divide mixed numbers and fractions, with each step through improper fractions and the answer as a mixed number and a decimal.
Proportion calculatorFill in three of the four values of a proportion and solve for the missing one by cross multiplication, with an exact fraction, a decimal and a check.
Multiplication calculatorMultiply whole numbers or decimals of any length and see long multiplication laid out with each partial product, the total and the decimal point placed.
Results follow the published rules shown above and are for guidance. For formal use, check them against your university's, board's or school's own document.