School and science

LCM and HCF calculator

Enter two or more whole numbers. The page factors each one and builds the LCM and the HCF from those primes.

Separate whole numbers with commas or spaces. HCF is the highest common factor, also called the GCF or GCD.

Runs in your browser. Nothing you type or open is uploaded. Free to use, no account. More school and science tools

How to use it

  1. Enter whole numbers separated by commas or spaces.
  2. Read the prime factorisation of each number.
  3. The HCF uses the lowest shared powers, and the LCM uses the highest powers.

How the primes become the answers

Each number is written as a product of primes. The highest common factor, also called the greatest common factor (GCF) or greatest common divisor (GCD), keeps a prime only when it appears in every number, and then only to the lowest power. The lowest common multiple keeps every prime that appears anywhere, to the highest power. Multiplying those powers gives the two results.

For 12 and 18 the factors are 2² × 3 and 2 × 3². The HCF is 2 × 3 = 6 and the LCM is 2² × 3² = 36. Negative signs are set aside before the factorisation, because the prime factors belong to the positive value. A list that includes 0 has LCM 0.

Private by design

Privacy

Everything runs in this page and stays on your device.

This page also shows Google ads, which can use cookies. Privacy and cookies explains how.

Questions

What is the LCM of 12 and 18?

36. The factor work is 12 = 2² × 3 and 18 = 2 × 3², and the highest powers multiply to 36.

Is HCF the same as GCF?

Yes. HCF, GCF and GCD are three names for the same number. This page uses HCF in the result and shows the shared primes.

Can I enter more than two numbers?

Yes. Every number contributes its primes. The HCF still takes the lowest power found in all of them, and the LCM takes the highest.

What about 1?

1 has no prime factors. It leaves the LCM unchanged and pulls the HCF down to 1 when it is in the list.

From the same developer