Free Online Tool

HCF LCM Calculator

Find the HCF/GCD and LCM of two or three numbers with steps

Reviewed by Prime Metric • Updated September 2026 WhatsApp

Enter Your Numbers

Whole numbers from 1 to 1,000,000.

Your Result

HCF / GCD

6

LCM

72

of 12, 18, 24

Steps (Euclidean algorithm)

gcd(12, 18):

12 ÷ 18 = 0 remainder 12

18 ÷ 12 = 1 remainder 6

12 ÷ 6 = 2 remainder 0

→ GCD = 6

gcd(6, 24):

6 ÷ 24 = 0 remainder 6

24 ÷ 6 = 4 remainder 0

→ GCD = 6

LCM(12, 18, 24) = 72

About this Tool

The HCF (Highest Common Factor, also called GCD) is the largest number dividing all inputs, found here with the Euclidean algorithm of repeated division. The LCM (Least Common Multiple) is the smallest number all inputs divide into evenly, computed as (a × b) ÷ GCD. This tool handles two or three whole numbers and shows every step.

Common Use Cases

Homework & Exams

Show full Euclidean-algorithm working for HCF and LCM problems step by step.

Simplifying Fractions

Divide numerator and denominator by their HCF to reduce fractions fully.

Syncing Schedules

Use the LCM to find when repeating cycles — buses, shifts, orbits — next coincide.

Recipe & Batch Scaling

Find common batch sizes and evenly divisible portions with HCF and LCM.

Pro Tips

  • !

    Euclidean Shortcut

    gcd(a, b) = gcd(b, a mod b) — repeat until the remainder is 0; the last divisor is the answer.

  • !

    LCM From HCF

    LCM(a, b) = (a × b) ÷ HCF(a, b) — always faster than listing multiples.

  • !

    Check Coprimes

    If the HCF is 1, the numbers share no factors (coprime) and the LCM is just their product.

FAQs

Was this calculator helpful?

Related Calculators

View all