Home / Education & Exams / GCD / LCM Calculator
🔢 GCD / LCM Calculator
Find the greatest common divisor and least common multiple of two numbers.
Last updated: November 2026 · Parameter year: 2026 · Methods and sources: Methodology · Editorial policy
What is GCD / LCM Calculator?
GCD (greatest common divisor) is the largest number that divides both numbers with no remainder; LCM (least common multiple) is the smallest positive number that is a multiple of both numbers. They are used to simplify fractions or to find common denominators.
This tool calculates the GCD and LCM of two numbers; the relationship between them is GCD × LCM = a × b. For example, for 12 and 18, the GCD is 6 and the LCM is 36.
It is useful for students checking homework and for teachers preparing examples. The numbers must be positive integers.
How to use
Fill in these fields: First number, Second number. Then press the button; the result appears on the same page and your data never leaves your device.
Formula
LCM = a × b / GCD
Example
12 and 18 → GCD 6, LCM 36
Worked examples and tips
Example 1: For the numbers 48 and 180, the tool gives a GCD of 12 and an LCM of 720. If you want to cut pieces of two different lengths from a fabric and divide it equally without leftovers, the longest common piece length is 12 units.
Example 2: One of two bus lines departs every 15 minutes and the other every 28 minutes. When you enter the numbers, the GCD is 1 and the LCM is 420. So the two buses meet at the same time for the first time after 420 minutes, that is, 7 hours later.
Example 3: For 84 and 126, you get a GCD of 42 and an LCM of 252. It can be used directly by a student who wants to simplify fractions or find common denominators; the fraction 84 over 126 simplifies by dividing by 42.
Tips and common mistakes: The GCD (EBOB) is used in problems about dividing and sharing, and the LCM (EKOK) in problems about repeating events and common multiples; choose by looking at the words greatest or smallest in the question. If two numbers are coprime, the GCD is 1 and the LCM equals their product. The tool works for two numbers; if you need three, calculate two first and then enter the result again with the third. Do not enter decimal or negative numbers; only positive integers are meaningful.
When to use it? It is used in school assignments, simplifying fractions, equal-sharing problems, finding when events that repeat at regular intervals will coincide, and in workshop or construction jobs where pieces must be cut to equal lengths.
Frequently asked questions
What about three numbers?
Calculate again using the result and the third number.
Related guide
- How to Find GCD and LCM: Prime Factors, the Euclidean Method and Solved Problems – How do you find the GCD (greatest common divisor) and LCM (least common multiple)? Prime factors and Euclid, three numbers, tile and bus problems.
- How to Calculate Ratio and Proportion: Direct, Inverse and Compound Proportion with Solved Examples – How do you calculate ratio and proportion? Cross-multiplication for direct, inverse and compound proportion, with mixture and map-scale examples.
- How to Add, Subtract, Multiply and Divide Fractions – How do you work with fractions? Rules for adding, subtracting, multiplying and dividing fractions, with common denominators, mixed numbers and simplifying.
Embed this calculator on your site
Copy the code below and paste it into your website, blog or email template. The calculator is free and runs on your site.