Skip to content
CalcEngine

HCF & LCM Calculator

HCF and LCM with prime factors.

Formulas and rates last reviewed · How we check

Your inputs

Results update instantly as you type.

Calculating…

 

 

Share this result

Shared messages and images include the CalcEngine name and a link that reopens these exact inputs.

Was this calculator helpful?

For education only: Results are rough estimates, not a substitute for professional design, building codes or site checks. Consult a qualified engineer (a structural engineer for buildings, a licensed electrician for wiring) before buying materials or starting work.

How the HCF & LCM Calculator works

HCF uses Euclid's algorithm; LCM = a × b ÷ HCF, applied pairwise.

HCF(a, b) = HCF(b, a mod b)
LCM(a, b) = a × b ÷ HCF(a, b)

Worked example

12, 18 and 24

  1. 12: 2^2 × 3 (prime factors)
  2. 18: 2 × 3^2 (prime factors)
  3. 24: 2^3 × 3 (prime factors)

HCF and LCM of 12, 18, 24: HCF 6 · LCM 72

Frequently asked questions

What is the HCF and LCM of 12, 18 and 24?

HCF 6, LCM 72.

Is HCF the same as GCD?

Yes, highest common factor = greatest common divisor.

Does HCF × LCM = product?

Only for two numbers.

Where is LCM used?

Adding fractions, scheduling repeating events, and gear tooth calculations.

Related calculators