Gcd Lcm Calculator

Find the greatest common divisor and least common multiple of two or more numbers instantly. No signup. Ideal for students, fractions, scheduling and simplifying ratios.

Remove Ads
Remove Ads

Result

GCD (HCF)
LCM
Remove Ads

Share on Social Media:

This calculator finds the greatest common divisor and least common multiple of two or more numbers instantly, directly in your browser. Enter your numbers and read both results, correctly computed. No account, no install, so students, anyone simplifying fractions, and people solving scheduling problems can get the GCD and LCM on any device in seconds.

How to Find the GCD and LCM Step by Step

  1. Enter your numbers. Type the two or more whole numbers you want to analyse. The calculator handles more than two numbers, finding the GCD and LCM across the whole set.
  2. Read the GCD. The greatest common divisor appears, the largest number that divides all your numbers exactly with no remainder. It is used to simplify fractions and ratios.
  3. Read the LCM. The least common multiple appears, the smallest number that all your numbers divide into exactly. It is used to add fractions and solve timing problems.
  4. Check the relationship. For two numbers, the GCD multiplied by the LCM equals the product of the two numbers, a useful check that both results are consistent.
  5. Use the results. Apply the GCD to simplify a fraction or ratio, or the LCM to find a common denominator or the point where two cycles align.
GCD and LCM calculator showing both results for a set of numbers

What GCD and LCM Mean and How They Relate

The greatest common divisor, or GCD, of a set of numbers is the largest number that divides all of them exactly, leaving no remainder. Also called the greatest common factor, it answers the question of the biggest chunk that fits evenly into every number in the set. The GCD of twelve and eighteen is six, because six is the largest number that divides both. It is a fundamental concept in number theory with very practical uses.

The least common multiple, or LCM, is the counterpart: the smallest number that all the numbers in the set divide into exactly. The LCM of four and six is twelve, the smallest number both four and six go into evenly. Where the GCD looks downward for the biggest shared factor, the LCM looks upward for the smallest shared multiple. Together they capture the two most important relationships between whole numbers.

GCD and LCM are linked. For any two numbers, the GCD times the LCM equals the two numbers multiplied together. So the GCD of twelve and eighteen is six, the LCM is thirty six, and six times thirty six equals twelve times eighteen. This relationship lets you find one from the other and check both are correct.

The GCD and LCM are elegantly connected. For any two numbers, their GCD multiplied by their LCM equals the product of the two numbers themselves. This relationship means that if you know one, you can find the other. It also provides a neat check on a calculation: multiply the GCD and LCM and confirm they equal the two numbers multiplied together, and you know both results are correct.

These concepts are not abstract curiosities, they solve everyday problems. Simplifying a fraction to its lowest terms means dividing the top and bottom by their GCD. Adding fractions requires a common denominator, which is the LCM of the denominators. Working out when two repeating events coincide, like two buses that arrive at different intervals, is an LCM problem. The GCD and LCM turn these practical questions into simple calculations.

This Calculator Versus Working It Out by Hand

ConceptGCDLCM
FindsLargest number dividing all of themSmallest number all of them divide into
DirectionLooks down for shared factorsLooks up for shared multiples
Main useSimplifying fractions and ratiosCommon denominators, timing problems
Example (12 and 18)636
Also calledGreatest common factorLowest common multiple

Who Needs the GCD and LCM

Students learning number theoryA student finds the GCD and LCM for homework, checking their manual working using the Euclidean method or prime factorisation against the calculator answer.
Anyone simplifying fractionsSomeone reducing a fraction to lowest terms divides the numerator and denominator by their GCD, and the calculator gives that GCD instantly.
People adding fractionsA person adding fractions with different denominators finds the LCM of those denominators to get the common denominator needed for the addition.
Anyone solving timing problemsSomeone working out when two repeating events coincide, buses, shifts, cycles, uses the LCM of their intervals to find when they align.
Teachers preparing materialAn instructor generating or checking problems involving factors and multiples uses the calculator to verify answer keys quickly and accurately.
Student checking GCD and LCM homework

Pro Tips for GCD and LCM Problems

Use the GCD to simplify fractions. To reduce a fraction to its lowest terms, find the GCD of the numerator and denominator and divide both by it. The result is the simplest equivalent fraction in a single step.
Use the LCM for common denominators. When adding or comparing fractions with different denominators, the LCM of the denominators is the smallest common denominator, keeping the numbers as small as possible.
Check with the GCD times LCM relationship. For two numbers, verify your results by confirming that the GCD multiplied by the LCM equals the two numbers multiplied together. If it does not, one of the values is wrong.
Handle more than two numbers at once. The calculator finds the GCD and LCM across a whole set, not just a pair. Enter all your numbers together rather than combining them two at a time, which is slower and error prone.
Simplify ratios with the GCD. To reduce a ratio to its simplest form, divide each part by the GCD of all the parts. Our Ratio Calculator applies this to simplify ratios directly.
Remember GCD is also called GCF. Greatest common divisor and greatest common factor are the same thing, so do not be confused if a problem uses one term and this tool uses the other.

Common GCD and LCM Mistakes to Avoid

Confusing the GCD with the LCM. The GCD is the largest shared factor and is usually smaller than your numbers, while the LCM is the smallest shared multiple and is usually larger. Mixing them up gives the wrong answer for whatever you are solving.
Using the GCD for a common denominator. A common denominator for adding fractions is the LCM of the denominators, not the GCD. Using the GCD here is a frequent error that produces an incorrect common denominator.
Using the LCM to simplify a fraction. Simplifying a fraction means dividing by the GCD, not the LCM. Applying the LCM instead does not reduce the fraction. Match the concept to the task: GCD to simplify, LCM to combine.
Forgetting the tool handles more than two numbers. Working through a set of numbers two at a time is unnecessary and invites mistakes. Enter all the numbers together and let the calculator find the GCD and LCM across the entire set at once.

To simplify a ratio using the GCD, our Ratio Calculator does it directly. For general calculations, the Scientific Calculator handles broader maths, and to check whether a number is prime, which relates to factors, the Prime Number Checker helps.

GCD and LCM results used to simplify a fraction

Frequently Asked Questions

What is the difference between GCD and LCM?

The greatest common divisor, GCD, is the largest number that divides all your numbers exactly, and it is used to simplify fractions and ratios. The least common multiple, LCM, is the smallest number that all your numbers divide into exactly, and it is used for common denominators and timing problems. In short, the GCD is the biggest shared factor and the LCM is the smallest shared multiple.

How do I find the GCD and LCM?

Enter two or more whole numbers into the calculator and it computes both the greatest common divisor and the least common multiple instantly. The GCD is the largest number dividing all of them evenly, and the LCM is the smallest number they all divide into. The tool handles more than two numbers at once, finding both values across the entire set you enter.

How are the GCD and LCM related?

For any two numbers, their GCD multiplied by their LCM equals the product of the two numbers. So for twelve and eighteen, the GCD is six and the LCM is thirty six, and six times thirty six equals twelve times eighteen, which is two hundred and sixteen. This relationship lets you find one value from the other and provides a quick way to check that both results are correct.

How do I use the GCD to simplify a fraction?

Find the GCD of the fraction numerator and denominator, then divide both by that GCD. The result is the fraction reduced to its lowest terms in a single step. For example, to simplify a fraction where the numerator and denominator share a GCD of six, dividing both by six gives the simplest equivalent fraction. This is the standard method for reducing any fraction.

How do I use the LCM to add fractions?

To add fractions with different denominators, find the LCM of those denominators, which becomes the common denominator. Convert each fraction to an equivalent one with that denominator, then add the numerators. Using the LCM rather than just any common denominator keeps the numbers as small as possible, making the addition and any later simplification easier. The calculator gives you the LCM instantly.

Can I find the GCD and LCM of more than two numbers?

Yes. The calculator finds the greatest common divisor and least common multiple across a whole set of numbers, not just a pair. Enter all your numbers together and it computes both values for the entire set at once. This is more accurate and faster than combining the numbers two at a time, which is tedious and increases the chance of an error.

Is GCD the same as GCF?

Yes. The greatest common divisor, GCD, is exactly the same as the greatest common factor, GCF, they are two names for the identical concept: the largest number that divides all your numbers exactly. Different textbooks and regions favour different terms, so you may see either. If a problem asks for the GCF, this calculator GCD result is the answer you need.

Is the GCD and LCM calculator free?

Yes, it is completely free with no account and no usage limit. You can find the GCD and LCM of as many sets of numbers as you like, as often as you like, at no cost. It runs entirely in your browser on any device, so there is nothing to download or install, and both results appear instantly whenever you enter your numbers.