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
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.
Related calculators
Fraction Calculator
Math & Statistics
Add, subtract, multiply and divide fractions.
Open calculatorRatio Calculator
Math & Statistics
Find the missing value in a proportion.
Open calculatorScientific Calculator
Math & Statistics
Trig, logs, powers, roots and more.
Open calculatorAverage Calculator
Math & Statistics
Mean, median, mode and range of a list.
Open calculatorBinary, Hex & Decimal Converter
Math & Statistics
Convert between binary, decimal, hex and octal.
Open calculatorSquare Root Calculator
Math & Statistics
Square, cube and nth roots.
Open calculator