Toolvore

LCM & GCF Calculator

Find exact LCM and GCF/HCF/GCD answers with prime-factor and Euclidean steps you can verify.

This tool runs entirely in your browser. Your data is never uploaded, never stored, and never leaves your device.

This finds the exact lowest common multiple and greatest common factor of positive whole numbers, then proves both answers with a prime-exponent table, Euclidean divisions and the LCM fold.

How to use it

  1. 1Type two or more positive whole numbers, separated by commas, semicolons or spaces.
  2. 2The LCM and GCF appear immediately, each with a copy button.
  3. 3Check the lowest and highest prime exponents, the Euclidean remainders and each pairwise LCM step underneath.

Example

Input
12, 18, 30
Output
GCF 6 = 2 × 3 · LCM 180 = 2^2 × 3^2 × 5

The table takes the lowest exponent in every prime column for the GCF and the highest for the LCM. The Euclidean and LCM folds below independently reach the same answers.

What happens to your data

This tool runs entirely in your browser. Your input is never uploaded to a server, never stored, and never logged. The arithmetic is done with BigInt in this tab.

Last updated September 2026

The lowest common multiple and the greatest common factor usually arrive together, because the questions that need one tend to need the other. Adding 1/6 and 1/8 needs their LCM, 24, as a common denominator. Cutting 1071/462 down to its simplest form needs their GCF, 21, which turns it into 51/22. A delivery that repeats every 12 days and a stock count that repeats every 18 land on the same day every 36.

Enter as many positive whole numbers as the question actually has — two, or ten — and the answers stay exact however large they get. Nothing is rounded on the way through, so a 28-digit LCM comes out with all 28 digits. Decimals, fractions, negative values and zero are rejected with an error instead of being quietly reinterpreted as different numbers.

The names differ by country and by textbook, which is half the confusion: an HCF calculator and a GCD calculator compute the same thing as a GCF calculator, and LCM and HCF are usually taught together because one is found from the other. This does the least common multiple and the greatest common factor side by side for exactly that reason — and shows a prime-exponent table, Euclidean divisions and the LCM fold so the relationship is visible rather than something to memorise.

How it works

Toolvore accepts only positive integers separated by commas, semicolons or whitespace. It finds the GCF with Euclid's algorithm — divide one number by the other, replace the pair with the divisor and the remainder, and stop when the remainder is zero — and prints every division. It then folds through the list again for the LCM, showing (running LCM ÷ GCF) × next number at each step so the intermediate never grows past the answer. For manageable values, a second derivation factorises every input and aligns the prime exponents in columns: the lowest exponent in every column forms the GCF and the highest forms the LCM. Factorisation is skipped when an input is longer than eighteen digits or trial division would pass one million, but the Euclidean and LCM results remain exact. Every value is held as a BigInt rather than an ordinary JavaScript number, which is why a 28-digit result keeps all 28 digits. Nothing you type is uploaded or stored; the arithmetic happens in the tab. The numbers do go into the address bar as you type, so Share hands over a link that reopens the same answer — though a value longer than 120 characters is ignored when that link is opened and the page falls back to its default 12, 18, 30.

Common use cases

  • Finding a common denominator before adding or comparing fractions — 1/6 and 1/8 meet at 24
  • Reducing a fraction to its lowest terms — 1071/462 divides through by 21 to give 51/22
  • Checking homework against the prime-exponent table, Euclidean divisions and pairwise LCM steps
  • Working out when two repeating cycles coincide — every 12 days and every 18 days meet every 36
  • Simplifying a ratio whose numbers are well past the point ordinary calculator arithmetic stays exact

Frequently asked questions

Is there a least common factor, or a lowest common divisor?+

No, and that is why searching for one is confusing. Every pair of whole numbers has 1 as a factor and 1 as a divisor, so the least common factor is always 1 and the lowest common divisor is always 1 — the answer never depends on the numbers you started with, which makes it useless. Anyone typing a least common factors calculator, a least common factor finder, a lowest common divisor calculator, or a less common factor calculator with the usual slip of the finger, is nearly always after one of the two quantities this page does compute. The greatest common factor is the largest number that divides both, and it is what simplifies a fraction. The lowest common multiple is the smallest number both divide into, and it is what gives two fractions a common denominator. If you are unsure which you want, ask whether you are making the numbers smaller or bringing them together: smaller is the GCF, together is the LCM.

What does a greatest common factor and least common multiple calculator do that I cannot do by hand?+

Nothing you could not do given time — it is the time it saves and the slips it avoids. Both quantities come from the same prime factorisation, so working them out by hand means factorising twice and then reading the shared primes one way for the GCF and the other way for the LCM. That is exactly the kind of repetitive step where a dropped factor goes unnoticed, because the wrong answer still looks like a plausible number. This does both from one pair of inputs so the two results cannot disagree with each other.

How do I find the LCM of three or more numbers?+

Type them all into the one box, separated by commas, semicolons or spaces. The list is folded a pair at a time, so 4, 6 and 21 first produce an LCM of 12, then LCM(12, 21) produces 84. The GCF follows the same pairwise path and ends at 1. Both answers and every step update as you type rather than waiting for a button.

Is HCF the same thing as GCF?+

Yes. Greatest common factor, highest common factor and greatest common divisor are three names for one number: the largest whole number that divides every number in the set. British schools usually say HCF, American ones GCF, and programming libraries tend to say GCD — Python's function is math.gcd. This labels it GCF, and the answer is the same whichever name you were taught. For 1071 and 462 it is 21.

Can I enter decimals, fractions or negative numbers?+

No. The input accepts positive whole numbers only, and it now refuses the whole entry visibly rather than turning punctuation into separators: 2.5 stays an error instead of becoming 2 and 5, -12 is not changed to 12, 1/3 is not treated as 1 and 3, and zero is rejected. If you are adding fractions, enter the positive denominators on their own.

How large can the numbers be?+

Larger than you are likely to need. Give it 12345678901234567890 and 9876543210987654321 and the GCF comes back as 90000000009 and the LCM as 1354807012498094801236261410 — 28 digits, every one of them correct. Ordinary JavaScript numbers, the default arithmetic in a browser, stop being able to hold every whole number past 9,007,199,254,740,991, about 9 quadrillion. Run the same method that way on those two values and it returns a GCF of 2048, which divides neither of them, and an LCM roughly 44 million times too big.

Why is the prime-exponent table skipped for some numbers?+

Trial division can become slow long before the exact GCF and LCM arithmetic does. The table is therefore skipped if any input runs past eighteen digits, or if trial division would have to test factors above one million. The Euclidean remainder steps and every LCM fold still appear and remain exact; only the optional prime-factor derivation is omitted so one awkward input cannot lock the tab.

If the GCF is 1, is the LCM just the numbers multiplied together?+

Only when no two of them share a factor. 6, 10 and 15 have a GCF of 1, yet their LCM is 30 rather than 900, because each pair still shares something. The tool checks the pairs rather than the whole set and tells you which case you are in — for 6, 10 and 15 it says two of them still share a factor, so the LCM is less than their product.