Loona Calculators
Loona Calculators › Maths › LCM & HCF Calculator

✖️ LCM & HCF Calculator

Enter two whole numbers — or three — and get their LCM (lowest common multiple) and HCF (highest common factor, also called GCD) at once. Essential for fractions, ratios and school maths.

How to use the LCM & HCF Calculator

  1. Enter the first whole number.
  2. Enter the second whole number — and a third one, if you have it.
  3. Press Calculate — the LCM and HCF appear below.
Example: For 12 and 18: the HCF is 6 and the LCM is 36. Adding 24 as a third number keeps the HCF at 6 and raises the LCM to 72.

Frequently Asked Questions

What is the difference between LCM and HCF?

The HCF is the largest number that divides both numbers exactly. The LCM is the smallest number that both numbers divide into exactly.

Is HCF the same as GCD?

Yes — Highest Common Factor and Greatest Common Divisor are two names for the same value.

Where are LCM and HCF used?

Adding and simplifying fractions needs the LCM of the denominators and the HCF of the numerator and denominator; ratio, tiling and scheduling problems use them too.

Related Calculators

%

Percentage Calculator

Maths

🔢

Average Calculator

Maths

➗

Ratio Calculator

Maths

📅

Age Calculator

Date & Time

√

Square Root Calculator

Maths

How it works — the formula

The calculator finds the HCF with the Euclidean algorithm: repeatedly divide the larger number by the smaller and keep the remainder, until the remainder is zero — the last divisor is the HCF (also called the GCD). The LCM is then found from the HCF, because for two numbers the product of the LCM and HCF always equals the product of the numbers themselves. With a third number, both operations are simply applied again: HCF of all three = HCF(HCF(a, b), c), and likewise for the LCM.

Formulas: LCM(a, b) = (a × b) ÷ HCF(a, b) · and so LCM × HCF = a × b.

Worked example

Example: For 16 and 24. Euclidean algorithm: 24 ÷ 16 leaves remainder 8; 16 ÷ 8 leaves remainder 0, so the HCF is 8. Then LCM = (16 × 24) ÷ 8 = 384 ÷ 8 = 48. Check: 48 × 8 = 384 = 16 × 24. ✔

Frequently asked questions

How can I check an LCM and HCF answer myself?

Multiply them: for any two numbers, LCM × HCF must equal the two numbers multiplied together. In the worked example, 48 × 8 = 384 and 16 × 24 = 384, so the answer checks out.

What if the numbers share no factors, like 8 and 9?

Then the HCF is 1 (the numbers are called co-prime) and the LCM is simply their product: 8 × 9 = 72. This calculator returns exactly that.

Can I enter decimals, zero or negative numbers?

No — the tool accepts whole numbers of at least 1 for the first two numbers (and for the optional third). LCM and HCF are defined for positive whole numbers.

Why does adding and subtracting fractions need the LCM?

Fractions can only be added or subtracted over a common denominator, and the LCM of the denominators is the smallest one that works — for 1/16 and 1/24 that is 48, giving 3/48 and 2/48.

Can I do more than three numbers?

Yes, in stages: find the LCM (or HCF) of the first numbers, then combine that result with the next number in a second run. The stepwise rule — LCM(LCM(a, b), c) — is exactly how this calculator handles its third number.

Embed this calculator on your website — free

Add this calculator to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the calculator to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.