Loading…

LCM and HCF

Math Algebra • Numbers

View all topics

Compute the Highest Common Factor / Greatest Common Divisor and the Least Common Multiple of two or more positive integers. Using prime factorisation: \[ \begin{aligned} \mathrm{HCF} &= \text{common primes with the smallest exponents},\\ \mathrm{LCM} &= \text{all primes with the largest exponents}. \end{aligned} \]

Numbers

Separate numbers with commas, spaces, semicolons, or line breaks. Example: 12, 18, 30. Each number must be a positive integer.

Quick examples

Ready
Enter the numbers, then click “Calculate”.

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What is the HCF?

The HCF, or Highest Common Factor, is the largest positive integer that divides every given number exactly.

What is the GCD?

The GCD, or Greatest Common Divisor, is another name for the HCF.

What is the LCM?

The LCM, or Least Common Multiple, is the smallest positive integer that is a multiple of every given number.

How does prime factorisation find the HCF?

Factor every number into primes. Use only primes that appear in every number, and choose the smallest exponent of each common prime.

How does prime factorisation find the LCM?

Factor every number into primes. Use every prime that appears in any number, and choose the largest exponent of each prime.

What are the HCF and LCM of 12, 18, and 30?

The HCF is 6 and the LCM is 180.

What does it mean if the HCF is 1?

It means the numbers have no prime factor shared by every number in the list. The set is relatively prime as a whole.

Does gcd(a,b) × lcm(a,b) = a × b?

Yes, for two positive integers. This simple identity is guaranteed for two numbers, but not in the same direct product form for more than two numbers.

Can this calculator handle more than two numbers?

Yes. It supports from 2 to 6 positive integers.

Why does the calculator use prime factor trees?

Prime factor trees help students see how each number breaks into prime factors, making the HCF and LCM exponent rules easier to understand.