About GCD Calculator
This GCD calculator finds the greatest common divisor using the Euclidean algorithm, and writes each division line so you can follow or check it. It is free, needs no sign-up and runs in your browser, so nothing you enter is uploaded.
The page opens on 1071 and 462, the textbook example. Divide 1071 by 462 to get 2 remainder 147; divide 462 by 147 to get 3 remainder 21; divide 147 by 21 to get 7 remainder 0. The last non-zero remainder, 21, is the GCD. Their LCM is 23562.
The algorithm works because gcd(a, b) = gcd(b, a mod b). It is far faster than factoring for large numbers: 252 and 105 take two divisions to give 21.
How to use GCD Calculator
- Choose LCM and GCF, LCM only or GCF only.
- Type two to ten positive whole numbers separated by commas or spaces.
- Read the answer at the top. It updates as you type.
- Check the prime exponent table: the GCF uses the smallest exponents and the LCM the largest.
- Open the steps for the Euclidean algorithm and, for two numbers, the link lcm = a × b ÷ gcd.
Features
- LCM and GCF (GCD, HCF) of 2 to 10 numbers at once.
- Prime factorization method with an exponent table.
- Euclidean algorithm shown division by division.
- Coprime detection.
- Numbers of up to 24 digits, computed exactly with big integers.
- Separate LCM-only and GCF-only views.
- Step list in KaTeX with a copy button for the LaTeX.
Euclidean algorithm
Replace the pair (a, b) by (b, a mod b) until b is 0.
gcd(1071, 462) = gcd(462, 147) = gcd(147, 21) = gcd(21, 0) = 21Worked examples
GCD of 1071 and 462 gives 21
Three divisions.
GCD of 252 and 105 gives 21
252 = 2 × 105 + 42, 105 = 2 × 42 + 21, 42 = 2 × 21.
Privacy: how it works
- Everything is calculated by code running in your browser tab. The numbers you enter are not sent to Ulkaa or to any other server, and there is nothing to sign in to.
Tips
- To add fractions, use the LCM of the denominators as the common denominator, which keeps the numbers small.
- To simplify a fraction, divide top and bottom by their GCF in one step.
- If the GCF of two numbers is 1, their LCM is just their product.
Frequently asked questions
Is it really free?
Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.
Do I need an account?
No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.
Does it run in my browser?
Yes. Numbers are processed by code running in your browser tab, on your own device.
Is my data uploaded?
No. Numbers are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.
What is the Euclidean algorithm?
A method for the GCD: divide, keep the remainder, and repeat with the divisor and remainder until the remainder is zero.
Why is the Euclidean algorithm fast?
Each division at least halves the remainder every two steps, so the number of steps grows with the number of digits, not with the size of the numbers.
More LCM and GCF Calculator pages
- LCM and GCF CalculatorEnter two to ten whole numbers to get their least common multiple and greatest common factor, with the working.
- LCM CalculatorEnter two to ten numbers to get their least common multiple.
- GCF CalculatorEnter two to ten numbers to get their greatest common factor.
- HCF CalculatorEnter numbers to get their highest common factor, with the working.