HCF and LCM Calculator

Calculate the HCF (GCD) and LCM of Any Numbers

Need to use HCF and LCM Calculator right now?

HCF (highest common factor) is another name for GCD — this calculates both it and the LCM together using the Euclidean algorithm.

No sign-upNo uploads 100% free

Greatest Common Divisor

12

Least Common Multiple

360

Features

  • Runs entirely in your browser
  • Privacy-first — your data is never uploaded
  • Real-time, instant results
  • 100% free, no sign-up required
  • Works on desktop, tablet, and mobile
  • No installation needed

Who uses this tool?

StudentsTeachersEngineersResearchers

About HCF and LCM Calculator

The greatest common divisor (GCD) is the largest number that divides evenly into every number in a set, and the least common multiple (LCM) is the smallest number that every number in the set divides evenly into — two of the most fundamental concepts in number theory, showing up constantly in fraction simplification, scheduling problems, and basic algebra.

This tool computes both the GCD and LCM for two or more whole numbers using the Euclidean algorithm — an efficient, ancient method (dating back over 2,000 years) that finds the GCD of two numbers by repeatedly replacing the larger number with the remainder of dividing it by the smaller, until the remainder reaches zero. The LCM is then derived directly from the GCD using the relationship LCM(a,b) = (a × b) / GCD(a,b).

For more than two numbers, the GCD and LCM are computed by combining results pairwise — the GCD of a full set is the GCD of the first two numbers combined with the third, and so on, which is mathematically equivalent to computing it all at once but far simpler to implement correctly.

This is useful for simplifying fractions to their lowest terms (divide numerator and denominator by their GCD), finding a common denominator when adding fractions (the LCM of the denominators), solving scheduling and repetition problems (when do two repeating events next coincide), and general number theory coursework.

How it works

  1. Enter two or more numbers. Separated by commas, any non-negative whole numbers.
  2. GCD and LCM compute automatically. Using the Euclidean algorithm for accuracy and speed.
  3. Use the results. For simplifying fractions, finding common denominators, or scheduling problems.

Examples

Finding GCD and LCM of three numbers

Input

24, 36, 60

Output

GCD: 12, LCM: 360

Frequently asked questions