LCM and HCF Calculator

Type two or more whole numbers to get their HCF (highest common factor, also called GCD) and LCM (least common multiple), along with the prime factorisation of each number, the way it is taught in Class 6 and Class 10.

2 to 20 whole numbers, separated by commas, spaces or new lines

HCF (GCD)

6

Highest Common Factor

LCM

72

Least Common Multiple

Prime factorisation

NumberPrime factors
122^2 × 3
182 × 3^2
242^3 × 3

HCF: multiply the primes common to every number, each at its lowest power. LCM: multiply every prime that appears, each at its highest power.

Features

  • HCF (GCD) and LCM of 2 to 20 numbers

  • Prime factorisation of each number

  • Co-prime check

  • HCF × LCM = product check for two numbers

  • Works with numbers up to 1 lakh crore (10¹²)

Where it helps

Class 6 and Class 10 maths

Check HCF and LCM answers and the prime factorisation steps.

Fractions

Find the lowest common denominator before adding fractions.

Scheduling puzzles

When will buses every 12, 18 and 24 minutes leave together again? After the LCM: 72 minutes.

Frequently Asked Questions

How the calculator works

The HCF is found with Euclid's division algorithm (divide, keep the remainder, repeat until the remainder is 0), which is fast even for very large numbers. The LCM of two numbers is a × b ÷ HCF(a, b), applied one number at a time for longer lists. The prime factors are shown in power form, so 360 appears as 2^3 × 3^2 × 5.

More maths tools: Fraction Calculator, Roman Numeral Converter, Statistics Calculator.