About LCM and GCF Calculator
This LCM and GCF calculator is free, needs no sign-up and runs in your browser, so the numbers you type are never uploaded. It finds the least common multiple (LCM) and the greatest common factor (GCF, also called the greatest common divisor, GCD, or highest common factor, HCF) of anything from two to ten whole numbers.
You get both standard methods side by side. The prime factorization method writes each number as a product of primes and fills in a table of exponents: the GCF takes the smallest exponent in each column and the LCM takes the largest. The Euclidean algorithm finds the GCF by repeated division and is shown line by line, which is the fastest way for big numbers.
The numbers can have up to 24 digits. The calculator also tells you when the numbers are coprime, meaning their GCF is 1. Use it for adding fractions with different denominators, simplifying fractions, scheduling problems and homework checks.
How to use LCM and GCF 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.
Two methods and one identity
With prime factorizations, the GCF multiplies the primes the numbers share, each to its smallest power, and the LCM multiplies every prime that appears, each to its largest power.
For two numbers the two answers are linked, so one gives you the other.
gcd(a, b) = gcd(b, a mod b)
lcm(a, b) = a × b / gcd(a, b)
GCF: smallest exponents, LCM: largest exponentsWorked examples
12 and 18 gives GCF 6, LCM 36
12 = 2² × 3 and 18 = 2 × 3². Smallest exponents give 2 × 3 = 6, largest give 2² × 3² = 36.
24, 36 and 60 gives GCF 12, LCM 360
GCF 2^2 × 3, LCM 2^3 × 3^2 × 5. The GCF takes the smallest power of each shared prime, the LCM the largest.
8, 9 and 21 gives GCF 1, LCM 504
The numbers are not pairwise coprime (9 and 21 share 3), but all three share nothing, so the GCF is 1.
1071 and 462 gives GCF 21, LCM 23562
The Euclidean algorithm needs only three divisions: 1071 = 2 × 462 + 147, 462 = 3 × 147 + 21, 147 = 7 × 21.
Good to know
Names for the same thing
GCF (greatest common factor), GCD (greatest common divisor) and HCF (highest common factor) all mean the largest whole number that divides every number in the list. GCD is common in computer science and higher mathematics, HCF in British and Indian curricula, and GCF in US school mathematics.
Only positive whole numbers are accepted. For fractions, decimals or negative numbers, convert or take absolute values first.
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 difference between LCM and GCF?
The GCF is the largest number that divides all of them, so it is never larger than the smallest number. The LCM is the smallest number that all of them divide, so it is never smaller than the largest.
Are GCF, GCD and HCF the same?
Yes. They are three names for the greatest common divisor of a set of numbers.
How do I find the LCM of three numbers?
Write each as primes and take the largest power of each prime, or find the LCM of the first two and then of that result with the third. The calculator does both.
What is the Euclidean algorithm?
Divide the larger number by the smaller, then repeat with the divisor and the remainder until the remainder is 0. The last non-zero remainder is the GCF.
What does it mean for numbers to be coprime?
Their GCF is 1, so they share no prime factor. 8 and 15 are coprime even though neither is prime.
How do I use the LCM to add fractions?
Use the LCM of the denominators as the common denominator, rewrite each fraction over it and add the numerators.
Popular LCM and GCF Calculator pages
- LCM CalculatorEnter two to ten numbers to get their least common multiple.
- GCF CalculatorEnter two to ten numbers to get their greatest common factor.
- GCD CalculatorEnter numbers to get the greatest common divisor, with every Euclidean step.
- HCF CalculatorEnter numbers to get their highest common factor, with the working.