LCM and HCF Calculator
Find the lowest common multiple and highest common factor.
LCM (lowest common multiple)
72
HCF is 6
HCF / GCD
6
LCM
72
Product of all numbers
5184
Coprime
No
HCF and LCM are computed pairwise across all values.
- HCF simplifies fractions and reduces ratios; LCM finds common denominators and answers "when do these cycles coincide".
| Number | Prime factorisation |
|---|---|
| 12 | 2^2 × 3 |
| 18 | 2 × 3^2 |
| 24 | 2^3 × 3 |
| 18 = 12 × 1 + 6 | remainder 6 |
| 12 = 6 × 2 + 0 | remainder 0 |
What does LCM and HCF Calculator do?
Calculate the LCM and HCF (also called GCD) of two or more numbers, with the prime factorisation and Euclidean algorithm steps shown so the method is clear, not just the answer.
How to Use LCM and HCF Calculator
- 1Enter your numbersSeparated by commas or spaces.
- 2Read both resultsLCM and HCF together.
- 3Expand the workingFactorisation and algorithm steps are shown.
Key Features
- Two or more numbers at once
- Prime factorisation of each input
- Euclidean algorithm steps shown for the HCF
- Verification that LCM × HCF equals the product, for two numbers
- Exact BigInt arithmetic for very large integers
Frequently Asked Questions
What is the difference between LCM and HCF?
HCF is the largest number that divides all of them; LCM is the smallest number they all divide into. For 12 and 18, the HCF is 6 and the LCM is 36.
How does the Euclidean algorithm work?
Repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder is zero. The last non-zero value is the HCF. It is over two thousand years old and still the fastest general method.
How do I find the LCM from the HCF?
For two numbers, LCM = (a × b) ÷ HCF. That identity does not extend to three or more, which must be done pairwise or from the prime factorisations.
Where is this actually used?
HCF simplifies fractions and reduces ratios. LCM finds common denominators and answers "when do these two cycles coincide" — buses at 12 and 18 minute intervals meet every 36 minutes.
All arithmetic runs in your browser, using exact BigInt maths where whole numbers are involved so nothing is lost to floating-point rounding.
Related Tools
Prime Number Checker
Check whether a number is prime and see its factors.
Fraction Calculator
Add, subtract, multiply and divide fractions with the steps shown.
Ratio Calculator
Simplify ratios, scale them up and solve for a missing value.
Factorial Calculator
Calculate exact factorials, permutations and combinations.