Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Mathematics
  • Number System and Arithmetic
  • Algebra
  • Trigonometry
  • Statistics
  • Probability
  • Geometry
  • Mensuration
  • Calculus
  • Logarithms
Open In App
Next Article:
Find the least common multiple (LCM) of given Strings
Next article icon

LCM - Least Common Multiple

Last Updated : 07 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

The Least Common Multiple (LCM) of two numbers is the smallest number that is evenly divisible by both of them.

Examples of LCM

LCM of 4 and 6 :
Multiples of 4 are 4, 8, 12, 16, 20......
Multiples of 6 are 6, 12, 18, 24, 30.......
The lowest common multiple of 4 and 6 is 12.

LCM of 12 and 18:
Multiples of 12 are 12, 24, 36, 48, 60 ......
Multiples of 18 are 18, 36, 54, 72 .......
The lowest common multiple of 12 and 18 is 36.

LCM of 20 and 15:
Multiples of 15 are 15, 30, 45, 60 ......
Multiples of 20 are 20, 40, 60, 80 .......
The lowest common multiple of 20 and 15 is 60.

LCM for Students

This section explains what LCM is, how to find it using different methods, and where it's used in real life.

  • Methods to Find LCM
  • LCM Formulas
  • LCM of Decimal Numbers
  • LCM of Fractions
  • LCM of Polynomials
  • Properties of LCM
  • Relation between HCF and LCM
  • Real-Life Applications of LCM
  • LCM Calculator

LCM for Aptitude Preparation

Boost your exam prep with LCM tricks, quizzes, and commonly asked aptitude questions and facts.

  • Tips and Tricks for LCM
  • Interesting Facts about LCM
  • LCM Quiz

LCM Practice Questions

Practice solving LCM problems at both basic and advanced levels to strengthen your understanding.

  • LCM - Practice Questions (Basic)
  • LCM - Practice Questions (Advanced)
  • HCF and LCM – Aptitude Questions

LCM for Coders

Explore LCM-based coding problems and programs, from simple logic to competitive programming challenges.

  • LCM of 2 Numbers Program
  • LCM of Array
  • LCM of First n Natural Numbers
  • LCM of factorial and its neighbors
  • Maximum sum of distinct numbers with LCM as N
  • GCD & LCM Coding Problems

Next Article
Find the least common multiple (LCM) of given Strings

S

satyam_sharma
Improve
Article Tags :
  • Mathematics
  • School Learning
  • GCD-LCM
  • LCM
  • Maths
  • Math-Concepts
  • Math Tutorials

Similar Reads

  • How to teach LCM (Least Common Multiple)
    LCM stands for Least Common Multiple, meaning it is the smallest positive number which can be divided by two or more given or provided numbers without leaving a remainder. LCM is determined by the smallest number in which all of the given numbers can be divided evenly. For example, the LCM for 4 and
    11 min read
  • LCM (Least Common Multiple) Coding Practice Problems
    The (Least Common Multiple) of two numbers is the smallest positive integer that can be divided by both of the numbers. Computing the LCMComputing the Least Common Multiple (LCM) of two numbers involves finding the smallest number that is a multiple of both. The most efficient way to compute the LCM
    3 min read
  • Find the least common multiple (LCM) of given Strings
    Given two strings str1 and str2 of lengths N and M respectively. The task is to find the least common multiple (LCM) of both the strings and if it doesn't exist print -1. Note: LCM of two strings is a string that can be formed by concatenating the strings to themselves and is shortest in length. Exa
    4 min read
  • Practice Questions on Least Common Multiple ( LCM ) - Basic
    The LCM is the smallest number that all given integers can divide without leftovers. It's super useful for stuff like adding fractions or finding out when events sync up. In other words the LCM is the smallest positive integer that is a multiple of all the given integers. Example: The LCM of 4 and 5
    4 min read
  • Practice Questions on LCM ( Least Common Multiple ) - Advanced
    The LCM is the smallest number that all given integers can divide without leftovers. It's super useful for stuff like adding fractions or finding out when events sync up. The LCM is the smallest positive integer that is a multiple of all the given integers. For Example: Take 4 and 5. Their LCM is 20
    7 min read
  • Least Common Denominator (LCD)
    The lowest Common Denominator or Least Common Denominator is the Least Common Multiple of the denominators of a set of fractions. Common denominator : when the denominators of two or more fractions are the same. Least Common denominator is the smallest of all common denominators. Why do we need LCD
    7 min read
  • Greatest Common Factor
    Greatest Common Factor or GCF is the largest positive integer that evenly divides two or more integers without leaving a residual. In simple words, the Greatest Common Factor is the largest value that can be used to divide these numbers and get whole numbers.  Greatest Common Factor is a fundamental
    12 min read
  • CSES Solutions - Common Divisors
    You are given an array of N positive integers. Your task is to find two integers such that their greatest common divisor is as large as possible. Example: Input: N = 5, arr[] = {3, 14, 15, 7, 9}Output: 7Explanation: GCD(14, 7)=7 which is the maximum possible among all the pairs Input: arr[] = {1, 12
    5 min read
  • Greatest Common Divisor - GCD
    The Greatest Common Divisor (GCD) also known as the Highest Common Factor (HCF) is the greatest number that divides a set of numbers without leaving a remainder. For example: GCD of 12 and 18 is 6 as it divides both numbers and is the largest of all their factors. The GCD of any two numbers is never
    4 min read
  • How to teach HCF (Highest Common Factor)
    HCF (Highest Common Factor) or GCD(Greatest Common Divisor) is the biggest positive integer that will divide any two or more integers without leaving a remainder. It is one of the most conceptually central ideas in arithmetic and algebra, serving as a way to reduce fractions and facilitate many othe
    10 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences