Free LCM & HCF Calculator Online
Instantly find the Least Common Multiple (LCM) and Highest Common Factor (HCF / GCD) of any 2 to 10 numbers. Full step-by-step working using prime factorization, the division method, and Euclid’s algorithm — with the LCM × HCF = product verification shown.
12, 18, 24 or 510 92.- Enter values to see the full working.
Everything You Need in One LCM & HCF Calculator
Unlike basic tools that return just a number, this LCM & HCF calculator shows the prime factorization of every input, the working for both the listing and division methods, and verifies the LCM × HCF = product relationship for two-number inputs.
Both LCM & HCF Together
Get the Least Common Multiple and Highest Common Factor for the same set of numbers in a single calculation. Perfect for the standard CBSE / Class 6–10 textbook problems that ask “find the LCM and HCF and verify the relation.”
LCM Only — Least Common Multiple
Find the smallest number that is divisible by all given numbers. Used to align cycles, find when events coincide, add or subtract fractions with different denominators, and solve LCM word problems.
HCF Only — Highest Common Factor
Find the largest number that divides each given number exactly — also known as GCD or GCF. Used for splitting items into the biggest equal groups, simplifying fractions, and competitive-exam HCF questions.
Prime Factorization Steps
Every input number is broken down into its prime factors with exponents (e.g., 24 = 2³ × 3). The calculator picks the lowest powers for HCF and the highest powers for LCM — exactly how it’s taught in the classroom.
Division & Euclid’s Methods
For HCF, the tool runs Euclid’s division algorithm internally and shows the remainder chain (e.g., 510 = 92 × 5 + 50…). LCM is then derived using the LCM(a,b) = (a×b) / HCF(a,b) shortcut for two numbers.
Verification & Worked Examples
For two-number inputs the calculator verifies the LCM × HCF = product identity automatically. Pre-loaded examples cover popular textbook pairs like 510 & 92, 336 & 54, 12 & 18 and more.
How to Find LCM and HCF in 3 Steps
Get the LCM, HCF, prime factorizations, and full step-by-step working in under five seconds — no signup, no app, no waiting.
Choose Your Mode
Pick from Both LCM & HCF, LCM Only, or HCF Only using the tabs at the top of the calculator. Each mode shows the same input box but highlights the relevant result and working.
Enter 2 to 10 Numbers
Type your numbers in the comma-separated box (e.g., 510, 92) or switch to individual fields. Use the quick-try chips for popular textbook pairs like 510 & 92 or 336 & 54.
Read the Result & Steps
The LCM and HCF appear instantly with the prime factorization of each number and a numbered step-by-step working. For two-number inputs, the LCM × HCF = product verification is shown automatically — perfect for checking homework.
Why This LCM & HCF Calculator Beats Basic Math Tools
Step-by-Step Working for Every Calculation
Unlike calculators that just return a number, this tool shows the full prime factorization of each input, the common-factor selection for HCF, and the highest-power selection for LCM — exactly the working a teacher expects in your notebook.
Up to 10 Numbers at Once
Most basic LCM/HCF calculators only handle two numbers. This tool accepts any 2 to 10 positive whole numbers, so problems like “find the LCM of 8, 12, 16, and 20” or “HCF of 15, 25, 35” can be solved without chaining calculations.
LCM × HCF = Product Verification
For two-number inputs, the calculator automatically computes both LCM × HCF and a × b and confirms they match. This is the exact verification step the NCERT and CBSE textbooks ask students to perform in every LCM-HCF exercise.
Euclid’s Algorithm Under the Hood
HCF is computed using Euclid’s division algorithm — the fastest known method. It works on integers of any size, never produces rounding errors, and is the same algorithm taught in your textbook for HCF using long division.
Two Input Methods
Switch between comma-separated input (paste a list like “510, 92, 336”) or individual numbered fields (with a count selector). Both methods feed the same calculation engine — pick whichever feels faster.
Mode-Specific Display
In HCF-only mode, the working highlights common prime factors and Euclid’s remainder chain. In LCM-only mode, it highlights the highest exponents. In both-mode, you get the full picture and the verification — ideal for exam revision.
LCM and HCF Examples — Pre-Solved Reference Table
Quickly look up the LCM and HCF for popular number pairs from the NCERT / CBSE textbook (Class 6–10) and competitive exams. Every row also shows the LCM × HCF = product check so you can verify your answer instantly.
| Numbers | HCF | LCM | LCM × HCF | Product (a × b) | Verification |
|---|---|---|---|---|---|
| 510, 92 | 2 | 23,460 | 46,920 | 46,920 | ✓ equal |
| 336, 54 | 6 | 3,024 | 18,144 | 18,144 | ✓ equal |
| 12, 18 | 6 | 36 | 216 | 216 | ✓ equal |
| 15, 25 | 5 | 75 | 375 | 375 | ✓ equal |
| 24, 36 | 12 | 72 | 864 | 864 | ✓ equal |
| 8, 9 | 1 | 72 | 72 | 72 | ✓ equal (co-prime) |
| 96, 404 | 4 | 9,696 | 38,784 | 38,784 | ✓ equal |
| 144, 198 | 18 | 1,584 | 28,512 | 28,512 | ✓ equal |
| 26, 91 | 13 | 182 | 2,366 | 2,366 | ✓ equal |
| 510, 92, 336 | 2 | 656,880 | — | — | 3+ numbers |
| 12, 18, 24 | 6 | 72 | — | — | 3+ numbers |
| 15, 25, 35 | 5 | 525 | — | — | 3+ numbers |
| 8, 12, 16, 20 | 4 | 240 | — | — | 4 numbers |
| 2, 3, 5, 7 | 1 | 210 | — | — | all co-prime |
Treat this as a free LCM & HCF worksheet: cover the HCF and LCM columns, solve each row by hand using prime factorization or the division method, then uncover to check your answer. The verification column proves that LCM × HCF = a × b for two-number inputs — the cornerstone identity tested in nearly every Class 6–10 textbook exercise. The 3-number rows show why this identity only works for exactly two numbers (LCM × HCF ≠ product when there are 3 or more).
Note: All values are computed using Euclid’s algorithm and prime factorization. Use the calculator above to verify any pair, including very large numbers up to 9 digits each.
What Are LCM and HCF? The Basics Explained
In number theory, LCM stands for Least Common Multiple — the smallest positive integer that is divisible by each of the given numbers. HCF stands for Highest Common Factor — the largest positive integer that divides each of the given numbers without leaving a remainder. HCF is also called GCD (Greatest Common Divisor) or GCF (Greatest Common Factor) — all three terms refer to the same value.
For example, take the numbers 12 and 18. The factors of 12 are {1, 2, 3, 4, 6, 12}; the factors of 18 are {1, 2, 3, 6, 9, 18}. The largest factor they share is 6 — so HCF(12, 18) = 6. The multiples of 12 are {12, 24, 36, 48…}; multiples of 18 are {18, 36, 54…}. The smallest multiple they share is 36 — so LCM(12, 18) = 36.
LCM and HCF Formula and Tricks
The most important LCM and HCF formula every student should memorise is the product identity:
This identity is the single fastest shortcut in LCM-HCF problems. If you know any three of the four values (a, b, HCF, LCM), you can find the fourth instantly.
Trick 1 — Find LCM from HCF: If the HCF of two numbers is known, LCM = (a × b) / HCF. This is much faster than listing multiples.
Trick 2 — Find HCF from LCM: HCF = (a × b) / LCM. Useful when an exam question gives you the LCM and asks for the HCF.
Trick 3 — Co-prime check: Two numbers are co-prime if HCF = 1, which means LCM = a × b directly. Examples: (8, 9), (7, 15), (11, 13).
Trick 4 — Fractions: For two fractions, HCF = HCF(numerators) / LCM(denominators), and LCM = LCM(numerators) / HCF(denominators). Useful in advanced problems.
How to Find LCM and HCF Using Prime Factorization
The prime factorization method is the most reliable way to find LCM and HCF — it works for any number of inputs and never produces rounding errors.
Step-by-Step Prime Factorization Example — LCM & HCF of 12 and 18
- Write each number as a product of prime factors: 12 = 2² × 3 and 18 = 2 × 3².
- For HCF, take each prime factor that appears in every number, raised to the lowest exponent.
- Common primes: 2 and 3. Lowest exponents: 2¹ and 3¹. So HCF = 2 × 3 = 6.
- For LCM, take every prime that appears in any number, raised to the highest exponent.
- Primes: 2 and 3. Highest exponents: 2² and 3². So LCM = 4 × 9 = 36.
- Verify: HCF × LCM = 6 × 36 = 216, and a × b = 12 × 18 = 216. Both equal — verified.
How to Find LCM and HCF Using the Division Method
The long-division method (sometimes called the cake or ladder method) is the second most common method in Indian/CBSE textbooks. It works directly on the list of numbers without explicit prime factorization.
LCM by Division Method — Worked Example
Find the LCM of 12, 18, and 24 using the division method:
- Write all numbers in a row. Divide by the smallest prime that divides at least one number (start with 2).
- 2 | 12, 18, 24 → 6, 9, 12. (9 wasn’t divisible; carry it down.)
- 2 | 6, 9, 12 → 3, 9, 6.
- 2 | 3, 9, 6 → 3, 9, 3.
- 3 | 3, 9, 3 → 1, 3, 1.
- 3 | 1, 3, 1 → 1, 1, 1. Stop.
- Multiply all the divisors: 2 × 2 × 2 × 3 × 3 = 72. So LCM(12, 18, 24) = 72.
For HCF using the division method, divide only by primes that divide every number until no common prime remains. The product of those divisors is the HCF. For (12, 18, 24): 2 divides all (carry 6, 9, 12), 3 divides all (carry 2, 3, 4). No further common prime. HCF = 2 × 3 = 6.
HCF by Euclid’s Division Algorithm
Euclid’s algorithm is the fastest method for finding the HCF of two numbers. It is based on a simple principle: HCF(a, b) = HCF(b, a mod b). Keep replacing the larger number with the remainder until the remainder becomes 0. The last non-zero divisor is the HCF.
This is exactly how our calculator computes HCF internally — using a tight while-loop that replaces (a, b) with (b, a mod b) until b reaches zero. It runs in O(log min(a,b)) time and handles numbers up to 9 digits effortlessly.
LCM and HCF Relationship — Why LCM × HCF = Product
The relationship LCM(a, b) × HCF(a, b) = a × b is one of the most beautiful identities in elementary number theory. Here is why it works, in plain terms:
- Every common factor between a and b is “counted once” in the HCF.
- Everything else — the unique prime powers in a and b — is captured in the LCM.
- Together, HCF × LCM reconstructs every prime power exactly the way they appear in a × b.
Important — for 3 or more numbers, this identity does NOT hold. For example, take 4, 6, and 8: HCF = 2, LCM = 24, HCF × LCM = 48. But the product 4 × 6 × 8 = 192. The identity is exclusive to two-number inputs and is the foundation of countless textbook verification questions.
LCM & HCF of 510 and 92 — Fully Solved
This is one of the most-searched LCM & HCF questions from the NCERT Class 10 textbook (Real Numbers chapter). Solving it step by step:
- Prime factorize: 510 = 2 × 3 × 5 × 17; 92 = 2² × 23.
- HCF — common prime with lowest exponent: only 2 is common, lowest power 2¹. HCF = 2.
- LCM — all primes with highest exponent: 2², 3, 5, 17, 23. LCM = 4 × 3 × 5 × 17 × 23 = 23,460.
- Verify: HCF × LCM = 2 × 23,460 = 46,920. Product = 510 × 92 = 46,920. Verified.
LCM & HCF of 336 and 54 — Fully Solved
Another classic NCERT Class 10 example. Solving step by step:
- Prime factorize: 336 = 2⁴ × 3 × 7; 54 = 2 × 3³.
- HCF — common primes 2 and 3 at lowest powers: 2¹ × 3¹ = HCF = 6.
- LCM — all primes at highest powers: 2⁴ × 3³ × 7 = 16 × 27 × 7 = 3,024.
- Verify: HCF × LCM = 6 × 3,024 = 18,144. Product = 336 × 54 = 18,144. Verified.
LCM & HCF Word Problems with Solutions
Word problems are where LCM and HCF become genuinely useful in everyday life. Use this simple rule of thumb:
- Use HCF when the question asks for the largest equal group, biggest size, or maximum divisor (e.g., “largest tape that measures…”).
- Use LCM when the question asks for the smallest common interval, when events meet again, or the smallest divisible quantity (e.g., “all bells ring together…”).
Word Problem 1 — Bell-Ringing (LCM)
Three bells ring at intervals of 4, 6, and 8 seconds. If they ring together at 12:00 PM, when will they ring together again? Solution: Find LCM(4, 6, 8). Prime factors: 2², 2 × 3, 2³. LCM = 2³ × 3 = 24. They ring together every 24 seconds, so next at 12:00:24 PM.
Word Problem 2 — Longest Measuring Tape (HCF)
The length, breadth, and height of a room are 6 m 80 cm, 5 m 10 cm, and 3 m 40 cm. Find the longest tape that can measure all three dimensions exactly. Solution: Convert to cm: 680, 510, 340. Find HCF(680, 510, 340) = 170 cm. The longest tape is 1 m 70 cm.
Word Problem 3 — Equal Packing (HCF)
210 oranges, 252 apples, and 294 pears are packed in cartons such that each carton has the same number of one type of fruit and no fruit is left over. What is the biggest possible number of cartons? Solution: Find HCF(210, 252, 294). Prime factors: 2×3×5×7, 2²×3²×7, 2×3×7². HCF = 2×3×7 = 42. So the answer is 42 cartons of each fruit type (5 of oranges, 6 of apples, 7 of pears).
Word Problem 4 — Smallest Divisible Number (LCM)
Find the smallest number which when increased by 23 is exactly divisible by 32, 36, 48, and 96. Solution: Find LCM(32, 36, 48, 96) = 288. The smallest number is 288 − 23 = 265.
LCM & HCF Questions for Class 6 (with Answers)
These questions follow the Class 6 CBSE / NCERT chapter on Playing with Numbers and are great for daily practice:
- Q1. Find the LCM of 9 and 12. (LCM = 36)
- Q2. Find the HCF of 24 and 36. (HCF = 12)
- Q3. Find the LCM and HCF of 15 and 25, and verify LCM × HCF = product. (HCF = 5, LCM = 75, both products = 375)
- Q4. Two numbers are 18 and 30. Find their LCM and HCF. (HCF = 6, LCM = 90)
- Q5. Find the smallest number which is divisible by 8, 9, and 10. (LCM = 360)
- Q6. Mary has dance class every 2nd day and painting every 3rd day. On which day will she have both? (LCM(2, 3) = 6th day)
- Q7. What is the HCF of two co-prime numbers, e.g., 15 and 28? (HCF = 1)
- Q8. Find the LCM of three numbers 12, 18, and 24 using the division method. (LCM = 72)
Type any of these into the calculator above to see the full step-by-step working — perfect for self-checking practice answers or building a complete LCM & HCF worksheet.
Difference Between LCM and HCF
Students often confuse LCM and HCF. The key distinction:
- HCF is always ≤ the smallest input. It is the “biggest divisor” — it cannot exceed the smallest number.
- LCM is always ≥ the largest input. It is the “smallest multiple” — it cannot be smaller than the largest number.
- HCF answers “What divides all of them?” — useful for grouping, splitting, and simplification.
- LCM answers “What do they all divide?” — useful for cycles, schedules, and fraction denominators.
When to Use This LCM & HCF Calculator
This tool is built for:
- Students (Class 4 to Class 10) — verifying NCERT / CBSE textbook answers and seeing the prime-factorization working.
- Competitive exam prep — SSC, banking, GMAT/GRE quant, and aptitude rounds frequently use the LCM × HCF identity.
- Teachers — generating worked examples and worksheets with verified answers.
- Programmers — checking expected outputs for GCD/LCM functions during algorithm practice.
- Real-world scheduling — aligning task cycles, work shifts, or interval-based events.
LCM & HCF Calculator — Frequently Asked Questions
Explore More Free Tools on WebToolTrix
Use related WebToolTrix calculators for fractions, percentages, averages, and scientific math — all free, browser-based, no login required.