Use the GCD & LCM Calculator
Find the GCD (HCF) and LCM of two or more numbers with prime factorisation and Euclidean algorithm steps. Free online calculator for students and teachers.
- Free to use
- No signup
- Nothing to install
- Runs in your browser
Illustration. Open the tool for the real thing.
What is the GCD & LCM Calculator?
The greatest common divisor (GCD), also called the highest common factor (HCF), is the largest number that divides every number in a set. The least common multiple (LCM) is the smallest number that every number in the set divides into. They are essential for simplifying fractions, finding common denominators and solving scheduling and pattern problems.
Enter two or more whole numbers and this calculator returns both the GCD and the LCM, the prime factorisation of each number, and — for two numbers — the step-by-step Euclidean algorithm so you can follow the working. It handles very large numbers accurately.
3 steps to your result
Open the tool and follow along. Nothing to install.
What you get
Both results for any list of numbers.
See each number broken into primes.
Full division steps for two numbers.
Uses exact integer arithmetic, no rounding errors.
AZRS tools are free to open and use.
It opens in your browser, so there is nothing to download.
Used for
Pick one to see how it fits.
How it compares
A plain look at this tool next to the usual alternative.
| This calculator | Desktop software | |
|---|---|---|
| Install | Nothing to install | Usually an app or program to install |
| Account | No signup | Depends on the product |
| Cost | Free to use | Free or paid, depends on the product |
| Where it runs | In your browser tab | On your computer |
Questions people ask
Are GCD and HCF the same?
Yes. GCD, GCF and HCF all mean the largest number that divides all the inputs.
How do you find the LCM?
Multiply the numbers and divide by their GCD (for two numbers), or use the highest prime powers.
What is the Euclidean algorithm?
Repeatedly divide and take remainders until the remainder is zero; the last non-zero remainder is the GCD.
Can it handle more than two numbers?
Yes, list as many as you need.
What is the GCD of 0 and a number?
It is that number.
More free tools
Related to the GCD & LCM Calculator.
Try the GCD & LCM Calculator now
Greatest common divisor and least common multiple. Free to use.
Try it free