Verystep Guides Verystep Guides
How to Find the GCD and LCM of Two or More Numbers
Two numbers, two answers β and one quick multiplication that tells you whether both answers are right before you use either of them.

Enter two or more whole numbers and the calculator returns two results. The GCD is the largest whole number that divides every number in your set with nothing left over. The LCM is the smallest whole number that every number in your set divides into evenly. You don't need either definition memorised to use the tool well. You need a routine: enter the numbers carefully, sanity-check both results against the size of your inputs, verify a pair with the product identity, then put each result to its usual job β the GCD simplifies a fraction, and the LCM gives you a common denominator.
What you are asking the tool to find
Skip the textbook wording for a second and think about what each result does. The GCD answers a sharing question: what's the biggest equal chunk that fits into all of your numbers with no remainder? The LCM answers a meeting question: what's the first total that all of your numbers reach at the same time? Same inputs, opposite directions. One result shrinks your numbers down to a shared divisor. The other stretches them up to a shared multiple.
That is why the two results sit at opposite ends of your inputs, and that gives you a free check before any other math. The GCD can't be bigger than your smallest number. The LCM can't be smaller than your largest number. If a result breaks either rule, you mistyped something. Don't work out why yet. Just re-enter the numbers and run it again.
Find the GCD and LCM in seven steps
Open the GCD and LCM Calculator and work down this list in order. The checks are built into the steps, so don't skip ahead to the fraction work.
- Enter two or more whole numbers into the calculator, checking each one as you type so a stray digit does not change the pair you meant to test.
- Read the GCD and the LCM in the results, and confirm the GCD is no larger than your smallest number and the LCM is no smaller than your largest.
- Follow the Euclid steps shown for a pair if you want to see why the GCD is what it is, working each division until the remainder hits zero.
- For exactly two numbers, check the identity by multiplying the two numbers together and comparing that product with the GCD multiplied by the LCM.
- Use the GCD to simplify a fraction by dividing the top and bottom by that GCD, then check that the reduced top and bottom share no common factor.
- Use the LCM as a common denominator by scaling each fraction up to that denominator before you add, subtract, or compare them.
- For three or more numbers, work in pairs β combine the first two, then combine that result with the next number β and do not expect the two-number identity to hold for the whole set.
Step four deserves a warning label. The identity in it works for two numbers only. It is a great check for a pair and a trap for a set of three, because the product rule simply doesn't extend that way. Step seven is the safe route for bigger sets: pairs, one at a time, carrying each result forward.
A worked pair: 48 and 180
Run 48 and 180. The calculator returns GCD(48, 180) = 12 and LCM(48, 180) = 720. Both pass the size check from step two: 12 is no larger than 48, and 720 is no smaller than 180. Now the identity. Multiply the original pair: 48 Γ 180 = 8,640. Multiply the two results: 12 Γ 720 = 8,640. Same product, so the pair of results hangs together. If those two products ever disagree, one of the results is wrong β or you copied a number down wrong, which happens more often than the math failing.

Want to see where the 12 came from? The tool shows Euclid's steps, and they run like this. Divide the larger by the smaller and keep the remainder: 180 = 48 Γ 3 + 36. Now divide the previous divisor by that remainder: 48 = 36 Γ 1 + 12. Once more: 36 = 12 Γ 3 + 0. The remainder hit zero, so the last divisor standing β 12 β is the GCD. No factor lists, no hunting. Each step just replaces a big pair with a smaller pair that shares the same GCD, until one number divides the other cleanly.
Put each result to work
Here's the fraction job. Take 48/180. Its GCD is 12, so divide the top and bottom by 12. You get 4/15. That's the same fraction, fully reduced, because 4 and 15 share no common factor besides 1. If you had divided by a smaller shared factor β say 4 β you'd get 12/45, which still reduces. Dividing by the GCD finishes the job in one pass. That's the whole point of finding the largest one.
The LCM job is the mirror image. Say you need a common denominator for fractions built on 48 and 180. The LCM, 720, is the smallest denominator both can scale up to without fractions of their own. Smaller shared denominators don't exist, and larger ones just give you bigger numbers to reduce at the end. Use 720, do the addition or comparison, then simplify the answer with its own GCD if it has one. Notice the rhythm: LCM first to combine, GCD last to clean up. Plenty of fraction work is just those two moves in that order.
Three or more numbers, and the mistakes to skip
Sets work the same way, one pair at a time. Take 24, 36, and 60. The tool returns GCD(24, 36, 60) = 12 and LCM(24, 36, 60) = 360. Behind that LCM sits the pairing from step seven: LCM(24, 36) = 72 first, then LCM(72, 60) = 360. Each pair is an ordinary two-number job. The set never needs a new method β it just needs patience and the right order.
Three mistakes show up again and again. First, swapping the results: using the LCM to simplify a fraction gives you enormous numbers, and using the GCD as a denominator usually gives you one that isn't common at all. Label each result as you write it down. Second, applying the product identity to three numbers and panicking when it fails β it was never promised for sets. Third, entering a decimal or a negative out of habit. This tool works on whole numbers. If your problem hands you decimals, scale them up to whole numbers first, find the results, then scale your thinking back down.
The Verystep GCD and LCM Calculator accepts two or more numbers, shows both results, and lays out Euclid's steps for a pair so you can see where the GCD came from. Enter 48 and 180 first, check that you get 12 and 720, then run your own numbers the same way.
Last verified November 16, 2026 β steps and worked examples checked against the Verystep GCD and LCM Calculator and verified by hand calculation.
Frequently asked questions
Can the calculator handle more than two numbers?
Yes. It accepts 2+ numbers in one run, so a set like 24, 36, and 60 returns its GCD of 12 and its LCM of 360 together. Behind the scenes the set is still worked in pairs β LCM(24, 36) = 72, then LCM(72, 60) = 360 β but the tool carries each result forward for you.
Why doesn't the GCD times LCM identity work for three numbers?
Because it is a two-number fact. For a pair, GCD Γ LCM always equals the product of the two numbers β 12 Γ 720 = 8,640 and 48 Γ 180 = 8,640. With three numbers the shared factors get counted in a more tangled way, and the neat equality breaks. Use the identity as a check for pairs only.
What if the GCD comes out as 1?
That means your numbers share no common factor besides 1. A fraction built from them is already fully reduced, so there is nothing to simplify. It isn't an error and it isn't a failed run. It's a useful answer: the numbers are as separate as whole numbers get, short of having nothing in common at all β which can't happen, since 1 divides everything.
How do I know I haven't swapped the GCD and the LCM?
Run the size check. The GCD is never larger than your smallest input, and the LCM is never smaller than your largest input. For 48 and 180, that means the small result, 12, must be the GCD and the large result, 720, must be the LCM. If your notes show the reverse, the labels are wrong, not the math.
Do I still need Euclid's method if the tool gives the answer?
Not for the answer itself. Euclid's steps earn their place when you want to check the GCD by hand, show your working, or understand why the result is right. The steps are short β for 48 and 180 there are only three divisions β so reading them once is a cheap way to trust every later run.
More guides

How to Use an Auto Loan Calculator to Compare Two Offers
Two dealers can quote payments that look almost identical and still be selling you loans that cost hundreds of dollars apart. The calculator shows you where the gap hides.

How to Build a Debt Payoff Order: Avalanche vs Snowball, Step by Step
Paying extra money toward debt only works if the extra money has a target. This guide builds that target: an ordered list, made two different ways, so you can see exactly where each spare dollar goes.

How to Project Compound Growth (and Read the CAGR Mode)
This calculator does two jobs in one place: it projects a balance forward at a rate you set, and it works backwards from two balances to the steady rate that links them.