Skip to content
PakCalc

LCM and GCF (HCF) Calculator

Enter two or more whole numbers to get their LCM and GCF (HCF). Useful for adding fractions, scheduling repeating events and simplifying ratios.

Updated

Separate numbers with commas, spaces or new lines.

Result

GCF 6 · LCM 180

GCF (HCF) = 6 · LCM = 180

Greatest common factor (GCF / HCF / GCD)
6
Least common multiple (LCM)
180
Numbers
12, 18, 30

Formula

GCF via Euclid's algorithm: gcd(a, b) = gcd(b, a mod b)

LCM(a, b) = a × b ÷ GCF(a, b)

For more than two numbers, the calculator applies the rule pair by pair.

Examples

  • 12, 18, 30

    GCF (HCF) = 6 · LCM = 180

  • 8 and 14

    GCF (HCF) = 2 · LCM = 56

Important information

  • HCF (Highest Common Factor) is the term used in Pakistani textbooks; GCF and GCD mean the same thing.

Frequently asked questions

Is HCF the same as GCF?

Yes. HCF, GCF and GCD are three names for the largest number that divides all of the given numbers.

What is the LCM used for?

Finding a common denominator for fractions, or when repeating events (e.g. buses every 12 and 18 minutes) coincide.

What is the HCF of two prime numbers?

1 — they share no other factor.