How to use it
- Enter your numbers. Type or paste at least two positive whole numbers, separated by commas (
12, 18, 24) or spaces (12 18 24). - Read the results. The GCF, LCM and count of numbers update the moment you stop typing, with no button to press.
- Copy or reset. Use Copy results to grab the figures as text, Load sample to see an example, or Clear to start over.
Only positive whole numbers count. Decimals, negative numbers, zero and any text that is not a number are skipped, and the small note under the box tells you how many entries were ignored.
LCM and GCF explained
The GCF (greatest common factor), also written HCF (highest common factor) orGCD (greatest common divisor), is the largest number that divides all of your numberswithout leaving a remainder. The LCM (least common multiple) is the opposite idea: thesmallest number that every one of your values divides into evenly.
To find the GCF this calculator uses the Euclidean algorithm, an ancient and very fast method that keeps replacing the larger number with the remainder of dividing the two until one of them reaches zero; whatever is left is the GCF. The LCM then follows directly from it, because for any two numbersLCM(a, b) = a × b ÷ GCF(a, b). For a longer list the tool simply carries each result forward, combining one number at a time across the whole set.
A worked example
Take 12, 18, 24. For the GCF, the Euclidean algorithm gives GCF(12, 18) = 6, and then GCF(6, 24) = 6, so the greatest common factor is 6. For the LCM, LCM(12, 18) = 12 × 18 ÷ 6 = 36, and then LCM(36, 24) = 36 × 24 ÷ 12 = 72, so the least common multiple is 72. In other words 6 is the biggest number that divides 12, 18 and 24, while 72 is the smallest number all three divide into cleanly.
Frequently asked questions
Are GCF, HCF and GCD the same thing?
Yes. Greatest common factor, highest common factor and greatest common divisor all describe the same value: the largest whole number that divides every number in your set with no remainder.
Why do I need at least two numbers?
A GCF and LCM describe a relationship between numbers, so they only make sense for two or more values. With a single number the result slots stay at "-" until you add another.
Why was one of my entries ignored?
Only positive whole numbers are used. Decimals, negatives, zero and stray text are skipped, and the note under the box tells you how many entries were left out so you can spot typos.
Is my data uploaded?
No. Every calculation runs in your browser with JavaScript, so your numbers are never sent anywhere, and the tool keeps working offline once the page has loaded.