Find the LCM and HCF (GCD) of two or more numbers, with step-by-step explanation.
LCM (Least Common Multiple) and HCF (Highest Common Factor, also called GCD — Greatest Common Divisor) are fundamental concepts in number theory, taught from middle school through competitive exams and used constantly in fractions, scheduling problems, and gear-ratio calculations in engineering.
The HCF of a set of numbers is the largest number that divides all of them exactly. The LCM is the smallest number that is divisible by all of them. They're related by the identity: LCM × HCF = Product of the two numbers (for exactly two numbers). This calculator extends both to any number of inputs by computing them iteratively: HCF(a,b,c) = HCF(HCF(a,b),c), and similarly for LCM.
HCF is used to simplify fractions — the HCF of the numerator and denominator is the common factor you divide both by to get the simplest form. LCM is used to find a common denominator when adding fractions. In real life, LCM appears in problems like "two events repeat every X and Y days — when will they coincide again?" or scheduling that must align with two different cycles.
This calculator uses the Euclidean algorithm for HCF, which is efficient even for large numbers, and the relationship LCM(a,b) = a×b / GCD(a,b) for LCM. The step-by-step display shows the prime factorization for a clearer educational breakdown.
Beyond fractions, LCM has surprising practical applications. Two gears with 18 and 24 teeth mesh together, and the LCM (72) tells you how many teeth pass the contact point before the same pair of teeth meet again — relevant for gear wear analysis. Similarly, if factory machine A needs maintenance every 12 days and machine B every 18 days, the LCM of 12 and 18 (which is 36) tells you when they'll both need maintenance simultaneously for planning shutdowns. Bus schedules, production planning, and even music theory (where LCM determines when different rhythmic cycles align) all use this concept. The step-by-step prime factorization shown here is exactly the method taught in school, making this equally useful for students wanting to verify their manual work. For very large numbers, the Euclidean algorithm used here remains efficient because it reduces the problem size quickly with each step, making it practical even for numbers with many digits unlike trial-division approaches that slow down significantly with larger inputs.
LCM (Least Common Multiple) और HCF (Highest Common Factor, जिसे GCD — Greatest Common Divisor भी कहते हैं) number theory में fundamental concepts हैं, middle school से competitive exams तक पढ़ाए जाते हैं और fractions, scheduling problems, और engineering में gear-ratio calculations में लगातार इस्तेमाल होते हैं।
Numbers के एक set का HCF वह सबसे बड़ा number है जो उन सभी को exactly divide करता है। LCM वह सबसे छोटा number है जो उन सभी से divisible है। वे identity से संबंधित हैं: LCM × HCF = दो numbers का product (exactly दो numbers के लिए)। यह calculator दोनों को किसी भी number of inputs तक extend करता है iteratively calculate करके: HCF(a,b,c) = HCF(HCF(a,b),c), और LCM के लिए similarly।
HCF का इस्तेमाल fractions को simplify करने के लिए होता है — numerator और denominator का HCF वह common factor है जिससे आप दोनों को divide करके simplest form पाते हैं। LCM का इस्तेमाल fractions जोड़ते समय common denominator ढूंढने के लिए होता है। Real life में LCM इन problems में दिखता है: "दो events हर X और Y दिन में repeat होते हैं — वे दोबारा कब coincide करेंगे?" या scheduling जो दो अलग cycles के साथ align होनी चाहिए।
Fractions से परे, LCM के surprising practical applications हैं। 18 और 24 teeth वाले दो gears mesh होते हैं, और LCM (72) बताता है कि contact point से कितने teeth pass होंगे same pair of teeth दोबारा मिलने से पहले — gear wear analysis के लिए relevant। Similarly, अगर factory machine A को हर 12 दिन और machine B को हर 18 दिन maintenance चाहिए, तो 12 और 18 का LCM (36) बताता है कि shutdown planning के लिए दोनों को simultaneously कब maintenance की ज़रूरत होगी। Bus schedules, production planning, और यहां तक कि music theory (जहां LCM निर्धारित करता है कि विभिन्न rhythmic cycles कब align होते हैं) सब इस concept का इस्तेमाल करते हैं। यहां दिखाया गया step-by-step prime factorization बिल्कुल वही method है जो school में पढ़ाया जाता है, जो इसे manual काम verify करने वाले students के लिए बराबर उपयोगी बनाता है। बहुत large numbers के लिए, यहां इस्तेमाल किया गया Euclidean algorithm efficient रहता है क्योंकि यह हर step के साथ problem size को quickly reduce करता है, इसे बड़े inputs के साथ significantly slow होने वाले trial-division approaches के विपरीत, कई digits वाले numbers के लिए भी practical बनाता है।