LCM & HCF Calculator
Find the greatest common divisor and least common multiple for integers or reduced positive fractions. Useful for common denominators, periodic cycles and simplifying arithmetic.
Each field is labelled with its meaning. Use consistent units within one calculation. Results are rounded for display.
Choose a mode, enter values and calculate. Use decimal points; lists accept commas or spaces.
Formula and method
For integers, Euclid’s algorithm gives GCD; LCM(a,b) = |ab|/GCD(a,b), with LCM zero when either input is zero. For reduced positive fractions, HCF = gcd(numerators)/lcm(denominators); LCM = lcm(numerators)/gcd(denominators).
Worked example
For 12 and 18, HCF = 6 and LCM = 36; 6 × 36 = 216 = 12 × 18. For 2/3 and 4/5, HCF = 2/15 and LCM = 4.
Read the result
HCF divides every value by a whole number. LCM is a whole-number multiple of every value. Negative integer signs are ignored.
Limits and edge cases
Two to 30 terms. Integer magnitudes and positive fraction terms are limited to 10^9. Fractions are reduced before calculation. GCD(0,0) and LCM(0,0) use the computational convention 0. Exact integer arithmetic avoids floating-point rounding.
Frequently asked questions
Does HCF × LCM equal the product for any list?
The identity is guaranteed for two numbers, not an arbitrary longer list.
Are decimal fractions accepted?
Use an explicit integer fraction such as 1/2 instead of 0.5 in fraction mode.