ILOMRAHomeStudy topicsFree toolsTest zoneSearch any topic
Free online tool

HCF and LCM Calculator (GCD & LCM)

Enter two or more whole numbers to find their highest common factor (HCF or GCD) and least common multiple (LCM).

Last updated: 24 November 2026

How it works

The HCF (also called GCD) is the largest number that divides all the given numbers exactly. The LCM is the smallest number that all of them divide into exactly. This free HCF online calculator finds both with Euclid’s method and shows the prime factors of each number.

For two numbers: HCF × LCM = first number × second number

Example: 12 and 18 have HCF 6 and LCM 36, and 6 × 36 = 12 × 18 = 216.

Frequently asked questions

What is the HCF of 12 and 18?

6, because 6 is the largest number that divides both.

What is the LCM of 4 and 6?

12, the smallest number that both 4 and 6 divide into.

Are HCF and GCD the same?

Yes. HCF (highest common factor) and GCD (greatest common divisor) mean the same thing.

Is this an HCF calculator?

Yes. Enter two or more numbers and this HCF calculator finds their highest common factor at once, along with the LCM and the prime factors of each number.

What is the highest common multiple?

There is no highest common multiple: multiples go on forever, so the common multiples of two numbers have no largest one. The term people usually mean is the lowest common multiple (LCM), which is the smallest number both numbers divide into — this calculator finds it.

Can I find the HCF and LCM of more than two numbers?

Yes, enter as many as you like, separated by commas or spaces.

How do I check if a number is prime?

Use the Prime Number Checker.

More free tools

All free tools