About this tool
Type two or more whole numbers and get their greatest common divisor (GCD) and least common multiple (LCM), with the working shown: the prime factorization of every number and Euclid's algorithm, division by division, for the first two. It also says whether the numbers are coprime (GCD 1). Useful for simplifying fractions, adding fractions with different denominators and problems about cycles that meet again. Large LCMs are calculated exactly. Runs in your browser.
How to use it
- 1 Type 2 to 10 whole numbers separated by commas or spaces.
- 2 Read the GCD and the LCM.
- 3 Check the prime factorization of each number.
- 4 Follow Euclid's algorithm to see where the GCD comes from.
Frequently asked questions
How are the GCD and LCM found from the factors?
The GCD multiplies the primes common to every number, each with its smallest exponent; the LCM multiplies every prime that appears, each with its largest exponent.
What is Euclid's algorithm?
Divide the larger number by the smaller, then the divisor by the remainder, and repeat until the remainder is zero: the last non-zero remainder is the GCD.
What does coprime mean?
Two numbers are coprime when their only common divisor is 1, like 8 and 15.
Embed this tool
Add this free tool to your own website — copy the code below. It stays up to date automatically.
Tools for your site →More in Maths & measures
Percentage Calculator
Percent of a number, percent change, discount price, and tip splitting - five common questions in one tool.
Rule of Three Calculator
Solve any rule of three - direct or inverse - and see the calculation step by step, with ready-made examples.
Quadratic Equation SolverNew
Solve ax² + bx + c = 0 with the quadratic formula: discriminant, real or complex roots, vertex, the steps and the graph of the parabola.
Grade Average CalculatorNew
Work out your simple or weighted grade average, whether it reaches the passing grade and the grade you need on the next test.
Unit Converter
Convert length, weight, temperature, area, volume, speed, time, pressure, energy and data - instantly, in your browser.
Random Number Generator
Pick fair random numbers in any range, with an option for no repeats.