Everything is worked out in your browser and saved on this device for next time.
About the GCF and LCM calculator
- The greatest common factor (GCF) is the biggest number that divides all your numbers with nothing left over. It is also called the greatest common divisor (GCD) or the highest common factor (HCF).
- The least common multiple (LCM) is the smallest number that all your numbers divide into.
This calculator shows both, says if your numbers share no factor except 1 (coprime), and lists the prime factorization of each number, so you can see where the answer comes from.
You can enter up to 12 numbers at once.
Features
- GCF and LCM together — the greatest common factor and the least common multiple at once
- Up to 12 numbers — not just two
- Coprime check — it tells you if the numbers share no factor except 1 (coprime)
- Prime factors table — the prime factorization of each number, so you see where the answer comes from
- Quick sets — tap 8, 12 or 12, 18, 30 to try it
- Live update — the result changes while you type
- Copy — copy the result with one click
- Private — it works in your browser, nothing is uploaded, and your numbers are saved on this device
How to use it
- Type your numbers in Whole numbers — two or more
- Put commas, spaces or new lines between them
- Or tap a quick set: 8, 12 · 12, 18, 30 · 24, 36 · 15, 25, 35
- The result updates while you type
- Press Copy to copy the result, or Start again to clear it
Example: 12, 18 and 30
The tool opens with 12, 18, 30.
| Number | Prime factorization |
|---|---|
| 12 | 2² × 3 |
| 18 | 2 × 3² |
| 30 | 2 × 3 × 5 |
- GCF: take the primes that every number has, with the lowest power: 2 × 3 = 6
- LCM: take every prime that appears, with the highest power: 2² × 3² × 5 = 180
- Coprime? No (they share 2 and 3)
More examples
| Numbers | GCF | LCM |
|---|---|---|
| 8, 12 | 4 | 24 |
| 24, 36 | 12 | 72 |
| 15, 25, 35 | 5 | 525 |
| 4, 6, 8 | 2 | 24 |
| 9, 14 | 1 | 126 |
9 and 14 have no common factor except 1, so they are coprime. For two coprime numbers the LCM is just the two numbers multiplied: 9 × 14 = 126.
A quick rule for two numbers
For two numbers, GCF × LCM = the two numbers multiplied. For 8 and 12: 4 × 24 = 96 = 8 × 12.
Frequently asked questions
What is the GCF used for?
To simplify fractions and ratios. 12/18 becomes 2/3 when you divide both by the GCF, 6.
What is the LCM used for?
To add fractions (it gives the common denominator) and to find when repeating events meet again. Buses every 12 and 18 minutes leave together every 36 minutes.
Is GCF the same as GCD and HCF?
Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same number.
How do I find the LCM by hand?
Write each number as prime factors. Take every prime that appears, each with its highest power, and multiply them.
What does coprime mean?
Two numbers are coprime when their GCF is 1, like 9 and 14. Neither number has to be prime.
Can I use decimals or negative numbers?
No. GCF and LCM are for positive whole numbers. A decimal like 1.5 is read as two numbers, 1 and 5, and a minus sign is dropped.
Good to know
- Everything is worked out in your browser — nothing is sent anywhere
- Your numbers are saved on this device for next time
- Up to 12 numbers are used; very large LCMs are shown as –
Related tools
- Prime Factorization Calculator — factors and divisors of one number
- Fraction Calculator — add and simplify fractions
- Ratio Calculator — simplify a ratio
- Math Worksheet Generator — print practice sheets
- Scientific Calculator — check your work