LCM and HCF of 2 to 10 numbers by prime factorisation, Euclid and the division method
Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 21 Nov 2026.Checked against the tool’s code on 18 November 2026. Figures read from their sources on 21 November 2026. What we collect
The HCF (highest common factor, or GCD) is the largest number that divides all the given numbers; the LCM (least common multiple) is the smallest number they all divide. For 12, 18 and 30 the HCF is 6 and the LCM is 180. This free calculator shows the prime factorisation, Euclid and division-method steps.
Nothing is uploaded: this runs in your browser.
Type 2 to 10 whole numbers, separated by commas or spaces; 12, 18, 30 is already there.
Read the HCF and LCM at the top, with their prime powers.
Follow the working: each number’s prime factorisation, then Euclid’s steps and the division ladder.
Press Copy to paste the answer and the working, or Share for a link to the same numbers.
Write each number as a product of prime powers. The HCF is the product of the smallest power of each prime that is common to all the numbers; the LCM is the product of the greatest power of every prime that appears. For 12 = 2² × 3, 18 = 2 × 3² and 30 = 2 × 3 × 5, the HCF is 2 × 3 = 6 and the LCM is 2² × 3² × 5 = 180. This is the method of the NCERT Class 10 chapter on real numbers, which rests on the Fundamental Theorem of Arithmetic: every whole number above 1 has exactly one prime factorisation.
For any two positive whole numbers a and b, HCF(a, b) × LCM(a, b) = a × b. For 6 and 20: 2 × 60 = 120 = 6 × 20. The calculator prints this check for two numbers. It does not hold for three or more numbers: for 12, 18 and 30, 6 × 180 = 1,080, not 6,480.
Euclid's algorithm finds the HCF without factorising: divide the larger number by the smaller, then divide the divisor by the remainder, and repeat until the remainder is 0; the last divisor is the HCF. For three or more numbers it is applied pair by pair. The division (ladder) method finds the LCM: divide the row by a prime that divides at least one number, bring the others down unchanged, and stop when every number is 1; the LCM is the product of the primes on the left. The calculator writes out both.
Each number can be up to 10¹² (one lakh crore), and the arithmetic is exact at any size of answer, so the LCM of two large primes is shown in full.
The calculator runs in this page. The numbers you type stay in your browser and are not sent to our server.
Type the three numbers, for example 12, 18, 30. The calculator factorises each one (2² × 3, 2 × 3², 2 × 3 × 5), takes the smallest power of each common prime for the HCF (2 × 3 = 6) and the greatest power of every prime for the LCM (2² × 3² × 5 = 180), and shows each step.
The HCF is the largest number that divides every number in the list; the LCM is the smallest number that every number in the list divides. The HCF is never bigger than the smallest number, and the LCM is never smaller than the largest.
Yes. Highest common factor (HCF), greatest common divisor (GCD) and greatest common factor (GCF) are three names for the same number; Indian school books say HCF, most other countries GCD or GCF.
For two numbers, always: HCF(a, b) × LCM(a, b) = a × b. For three or more numbers it is not true in general; for 12, 18 and 30 the HCF × LCM is 1,080 while the product is 6,480.
1. Co-prime numbers, such as 8 and 15, share no prime factor, so their HCF is 1 and their LCM is their product, 120. The calculator says when the numbers are co-prime.
Up to 10 numbers, each up to 1,000,000,000,000 (10¹²). The LCM is shown in full, however long it is, because the calculator works with exact whole numbers rather than rounded decimals.
No. The calculator runs entirely in your browser, so the numbers you type stay on your device and are never sent to our server or stored by us. The page records only an anonymous count that the tool was used, with no numbers in it.
Rates and rules change; check the source before you rely on a figure.
Still stuck? Ask about LCM and HCF Calculator, With Prime Factorisation Steps and anybody who knows can answer. No account needed.
Same job, other tools: Percentage to CGPA Calculator – Percentage back to a CGPA on a 10-point scale, with an editable divisor.
On the related tools: CBSE Percentage Calculator (Best of Five) – Class 10 or 12 percentage over your best five subjects, with the 33% pass mark in each.
On the same topic: Fraction Calculator – Add, subtract, multiply and divide fractions and mixed numbers, simplified, with steps · Equation Solver With Steps: Quadratic and Simultaneous – Solve linear, quadratic and 2 or 3 simultaneous equations exactly, with every step.