LCM and HCF calculator
Type two to eight whole numbers to get their LCM and HCF, with the working shown in three different ways.
About LCM and HCF Calculator
The HCF, also called the GCD or GCF, is the biggest number that divides all of your numbers without a remainder. The LCM is the smallest number that all of them divide into. This calculator finds both, then shows how: the prime factorisation of each number, the repeated division table used in school to get the LCM, and the Euclidean division steps for the HCF. Numbers can be as large as one quadrillion (10^15), and the LCM is worked out exactly even when it is far bigger.
- Adding or comparing fractions with different denominators.
- Finding when two repeating events line up again.
- Reducing a fraction or a ratio to its simplest form.
- Checking homework that asks for a particular method.
How to use LCM and HCF Calculator
Step 1
Type the numbers, separated by commas or spaces.
Step 2
Read the HCF and LCM at the top.
Step 3
Open the tables below to see the factorisation, the division method and the Euclidean steps.
Good to know
- Only positive whole numbers are accepted. Zero and decimals have no useful LCM or HCF here.
- If the HCF is 1 the numbers are called coprime, and their LCM is simply their product when there are only two.
- Very large inputs that are prime or have two huge prime factors can take a moment to factorise, because the method is trial division.
Common questions
What is the difference between LCM and HCF?
The HCF is the largest number that divides every input. The LCM is the smallest number that every input divides. The HCF is never larger than the smallest input, and the LCM is never smaller than the largest.
Is HCF the same as GCD?
Yes. HCF (highest common factor), GCD (greatest common divisor) and GCF (greatest common factor) all mean the same number.
How are the LCM and HCF of two numbers related?
Their product equals the product of the two numbers: HCF x LCM = a x b. For 12 and 18 that is 6 x 36 = 216 = 12 x 18.