GCD and LCM calculator
Calculators
Enter two or more whole numbers.
Runs in your browser
Nothing is uploaded. The work happens on your own device, so your file or text never reaches us.
About this tool
What they are for
The GCD is the largest number that divides all of them. Its everyday use is simplifying fractions: 18/12 reduces by their GCD of 6 to 3/2.
The LCM is the smallest number they all divide into. Its use is finding a common denominator, and working out when repeating events coincide — two buses every 12 and 18 minutes meet every 36.
The two are tied together: GCD(a,b) × LCM(a,b) = a × b. Computing one gives the other.
Questions
What is the GCD of 12 and 18?
6. The divisors of 12 are 1, 2, 3, 4, 6, 12; of 18 are 1, 2, 3, 6, 9, 18. The largest shared one is 6.
How large can the numbers be?
Arbitrarily. The calculation uses exact integer arithmetic, so hundred-digit numbers work.
Related tools
Prime checkerTest whether a number is prime and get its prime factorisation. Primality is proved rather than guessed, and works on very large numbers.FractionsReduce a fraction to its lowest terms, get the mixed number, and see the exact decimal — with repeating digits marked rather than rounded away.Mean, median, modePaste a list of numbers for the mean, median, mode, range, quartiles and both standard deviations — with a plain explanation of which one you need.