GCD & LCM Calculator
Calculate the highest common factor and lowest common multiple of any set of whole numbers, with the division steps shown.
Runs in your browser. Nothing is uploaded Free, no sign-up Works on mobile
NumbersTwo or more whole numbers, separated by commas or spaces
GCD / HCF
6
LCM
180
Euclid’s algorithm (12, 18)
12 = 18 × 0 + 12
18 = 12 × 1 + 6
12 = 6 × 2 + 0
How to use GCD & LCM Calculator
- Enter two or more whole numbers.
- Read the HCF/GCD and LCM.
- Follow Euclid’s algorithm steps for the first two numbers.
Frequently asked questions
What is the relation between HCF and LCM?
For two numbers, HCF × LCM = the product of the numbers. For 12 and 18: 6 × 36 = 216 = 12 × 18.
Is GCD the same as HCF?
Yes. Greatest common divisor (GCD) and highest common factor (HCF) are two names for the same thing.
Related tools
All Everyday Calculators →- Prime Number Checker Test whether a number is prime, break composite numbers into prime factors, and list the primes in any range.
- Ratio Calculator Solve proportions, reduce ratios to their simplest form, and share an amount between people in a given ratio.
- Quadratic Equation Solver Enter a, b and c to solve any quadratic equation, including equations with complex roots.
- Probability Calculator Solve probability problems: single events, two independent events, combinations and permutations, and binomial distributions.
- Percentage Calculator Solve every common percentage problem in one place: percent of a number, percent change, reverse percentages and exam marks percentage.
- Scientific Calculator A full scientific calculator in your browser.