Ireland · Maths & Statistics
LCM and HCF Calculator Ireland
Enter two or more whole numbers and get their highest common factor and lowest common multiple, with each number broken into primes so you can see exactly where the answers come from.
How do you find the LCM and HCF of two numbers?
Break each number into prime factors. The HCF is the product of the lowest power of every shared prime, and the LCM is the product of the highest power of every prime that appears. For 12 and 18 the primes are 2² × 3 and 2 × 3², so the HCF is 6 and the LCM is 36. As a check, HCF × LCM always equals the product of the two numbers.
How to use this calculator
- Enter the numbersTwo or more positive whole numbers, separated by commas or spaces.
- Read the prime factorisations firstEach number is shown as a product of primes. The rest of the working follows from that one line.
- Decide which answer the problem wantsSomething being split into equal groups or tiles wants the HCF. Something repeating together wants the LCM.
- Use the check lineHCF × LCM equals the product of the two numbers when there are exactly two.
One factorisation, two answers
Prime factorisation is a Junior Cycle number topic, and it is the cleanest route to both the HCF and the LCM. Once each number is written as a product of primes, the two answers fall out of the same table.
For the HCF, take what the numbers share. Only primes that appear in every number count, and each is taken to its lowest power. That gives the largest number that divides them all exactly.
For the LCM, take everything. Every prime that appears anywhere is included, each at its highest power. That gives the smallest number that all of them divide into.
Two numbers with no shared prime are coprime. Their HCF is 1 and their LCM is simply their product. 8 and 15 are the standard example.
The two answers are linked. For exactly two numbers, HCF × LCM equals the product of the numbers, which makes a fast check on your own working.
They also power fractions. The LCM of the denominators is the smallest common denominator when adding fractions, and the HCF of a numerator and denominator is the number you divide by to simplify. That is why this tool sits naturally alongside the fraction calculator.
HCF = product of the lowest power of each shared prime · LCM = product of the highest power of every primeWorked example: two buses and a tiled floor
Two services meeting again. One bus route runs every 12 minutes and another every 18. They leave the same stop together now, and the next time is the LCM. Entering 12 and 18 gives LCM 36, so they coincide again after 36 minutes. The HCF of 6 tells you the timetables share a rhythm of 6 minutes.
Tiling a floor. A floor measures 240 cm by 180 cm and you want the largest square tiles that fit with no cutting. That is the HCF of 240 and 180, which is 60 cm. The floor takes 4 × 3 = 12 tiles, and the LCM of 720 is the side of the smallest square that both lengths divide into.
Three numbers. For 4, 6 and 10 the HCF is 2 and the LCM is 60. The calculator handles any number of values, and the LCM grows quickly as more are added.
A useful check: the HCF can never be larger than the smallest number, and the LCM can never be smaller than the largest.
Common sets compared
| Numbers | HCF | LCM | Coprime? |
|---|---|---|---|
| 12 and 18 | 6 | 36 | No |
| 8 and 15 | 1 | 120 | Yes — HCF is 1 |
| 24 and 36 | 12 | 72 | No |
| 4, 6, 10 | 2 | 60 | No |
8 and 15 share no prime, so their HCF is 1 and their LCM is the full product of 120. 24 and 36 share a lot, so the HCF is large and the LCM is barely bigger than the larger number.
Where HCF and LCM get mixed up
Using the HCF when the LCM is wanted. A problem about things happening together again is an LCM problem. A problem about splitting into equal groups is an HCF problem.
Confusing “factor” and “multiple”. Factors divide into a number and multiples are produced by it. The HCF is at most the smaller number; the LCM is at least the larger.
Stopping factorisation too early. 12 is not 3 × 4; the 4 must be split further into 2 × 2.
Forgetting a prime. Missing one prime from a list gives a wrong LCM.
Assuming the answer is the product. That is only true for coprime numbers.
The timetable example assumes services run at exactly regular intervals. Real timetables have gaps and variations that a maths model does not.
Assumptions and limitations
- Works on whole numbers of two or more values separated by commas or spaces
- Numbers must be positive integers; zero and negatives are rejected
- Very large numbers are limited by the precision of browser integers
- The HCF is also called the GCF or GCD; they are the same number
- LCM of large sets can grow quickly and may exceed safe integer size
- Word problems still need you to decide whether they call for the HCF or the LCM
Questions people ask about this in Ireland
How do you find the LCM and HCF of two numbers?
Write each as primes. HCF takes the shared primes at their lowest powers, LCM takes all primes at their highest. 12 and 18 give 6 and 36.
The working shows both.
What is the largest square tile for a 240 cm by 180 cm floor?
The HCF of 240 and 180, which is 60 cm.
The floor then needs 12 tiles.
When will two buses leave together again?
After the LCM of their intervals. Every 12 and every 18 minutes gives 36 minutes.
Assume perfectly regular services.
What does coprime mean?
Two numbers with no common prime factor, so their HCF is 1.
8 and 15 are coprime.
Is HCF × LCM always the product of the numbers?
For exactly two numbers, yes.
It does not hold for three or more.
Can I use more than two numbers?
Yes. Enter as many as you like, separated by commas or spaces.
The LCM can get large quickly.
Related Ireland calculators
Tools people usually open in the same sitting.
The same calculator for other markets
The maths is identical everywhere. These versions use local units, currency and worked examples.
Method, source and review date
- How it is worked out
- Prime factorisation by trial division
- Formula used
HCF = Π p^min(powers); LCM = Π p^max(powers)- Checked against
- Standard arithmetic
- Last reviewed
- Confidence
- High
Spotted a figure that has moved, or a formula you can show is wrong? Tell us — send a correction. Fixes to rates and formulas are treated as urgent.
Disclaimer
This calculator gives an estimate for guidance only. Check the figures against your own measurements or paperwork before you commit money to them.