LCM & HCF

LCM and HCF Calculator

Find the LCM and HCF (GCD) of two or more numbers, with the prime factorisation and working shown step by step.

HCF (greatest common divisor)–
LCM (lowest common multiple)–

Prime factorisation of each

–

How they combine

–
The HCF takes the lowest power of every prime the numbers share; the LCM takes the highest power of every prime that appears in any of them. That single difference is the whole distinction.

Last updated 3 September 2026

Two answers from one factorisation

Break each number into primes and both results are sitting there. For the highest common factor, take every prime that appears in all of them and use the lowest power any of them has — that is the largest number dividing into all of them. For the lowest common multiple, take every prime that appears anywhere and use the highest power — that is the smallest number they all divide into. The relationship between them is exact for two numbers: their HCF times their LCM equals their product, which is why finding one immediately gives you the other. For longer lists the calculation chains, folding the running answer against each new number in turn.

What each one answers

The highest common factor is the largest number that divides into all of your values. The lowest common multiple is the smallest number they all divide into. They sound similar and answer opposite questions, which is where the confusion comes from.

The HCF is a splitting question. If you have 48 red tiles and 36 blue tiles and want identical groups with none left over, the HCF of 12 tells you the largest number of groups possible. The LCM is a repeating question. If one bus comes every 12 minutes and another every 18, the LCM of 36 tells you they arrive together every 36 minutes.

Prime factorisation, and why it matters for fractions

Both are found from prime factors. For 48 = 2⁴ × 3 and 36 = 2² × 3², the HCF takes the lowest power of each shared prime, giving 2² × 3 = 12. The LCM takes the highest power of every prime present, giving 2⁴ × 3² = 144. A useful check: for any two numbers, HCF × LCM equals the product of the numbers themselves — here 12 × 144 = 1,728 = 48 × 36.

The everyday application is fractions. Simplifying means dividing top and bottom by their HCF, so 36/48 reduces to 3/4 in one step rather than several. Adding fractions means finding the LCM of the denominators — for 1/12 + 1/18, the LCM of 36 gives 3/36 + 2/36 = 5/36. Using any common multiple works, but the lowest one keeps the numbers small and avoids simplifying afterwards.

Common questions

What is the difference between HCF, GCD and GCF?

Nothing — they are three names for the same thing. Highest common factor, greatest common divisor and greatest common factor all mean the largest number that divides into every number in the set.

Is there a shortcut for two numbers?

Yes. For any two numbers, HCF × LCM equals their product. So once you have one, dividing the product by it gives the other. This holds only for pairs, not for longer lists.

What happens if I include zero?

Zero is skipped. Every number divides zero, so including it makes the HCF meaningless and the LCM zero — neither of which is a useful answer, so the tool ignores it and works with the rest.

Can it handle more than two numbers?

Yes, as many as you like. Both results are built up by folding the running answer against each number in turn, which gives the same result as factorising them all at once.

What is the difference between HCF and LCM?

The HCF is the largest number that divides into all your values, which answers splitting questions. The LCM is the smallest number they all divide into, which answers repeating questions such as when two recurring events coincide.

How are they used with fractions?

Divide the numerator and denominator by their HCF to simplify a fraction in one step. Use the LCM of the denominators to add or subtract fractions, since it gives the smallest common denominator and avoids simplifying afterwards.

Is there a quick way to check my answer?

For any two numbers, the HCF multiplied by the LCM equals the product of the numbers. For 48 and 36, that is 12 × 144 = 1,728, which matches 48 × 36. The check does not extend to three or more numbers.

The other tools