Bookmarks    
nPr and nCr    
Random Number    
SD Calculator    
Sample Size    
Percent Error    
Density    
Molarity    
Molar Mass    
Ohm's Law    
Watts to Amps    
Voltage Drop    
Long Division    
Mixed Numbers    
Rounding    
Nth Root    
Exponents    
Half-Life    
Polar Form    
De Moivre    
3D Distance    
Point to Line    
Cross Product    
Determinant    
Sin Cos Tan    
Triangle Area    
Scale Factor    
Sector Area    
Ellipse Area    
Cube Volume    
Box Volume    
Sphere Volume    
Cone Volume    
Pipe Volume    
Time Duration    
Time Card    
Present Value    
Future Value    
Churn Rate    
A/B Test Calc    
SEO Traffic    
Ideal Weight    
Fat Intake    
Child Height    
Golf Handicap    
Heat Index    
Wind Chill    
Dew Point    
Download Time    
kWh to Cost    
AC Size (BTU)    
Heating Costs    
LED Savings    
Trip Gas Cost    
Tire Size    
Solar Output    
Solar Payback    
Battery Size    
Wall Area    
Gravel Needed    
Mortar Mix    
Slope Grade    
Curtain Size    
Soil Needed    
Sod Needed    
Ramp Length    
Blind Size    
Drain Slope    
Board Feet    
Heat Loss    
Furniture Fit    
Moving Boxes    
Plywood Cuts    
Shelf Sag    
   Add
Probability and random number calculators
Independent Events
Independent Events
Two Events Solver
Two Events Solver
Repeated Trials
Repeated Trials
Bayes' Theorem
Bayes' Theorem
Expected Value
Expected Value
Binomial Distribution
Binomial Distribution
nPr and nCr
nPr and nCr
Circular Permutation
Circular Permutation
With Repetition
With Repetition
Random Number
Random Number
Averages and statistics calculators
Average Calculator
Average Calculator
Mean Median Mode
Mean Median Mode
SD Calculator
SD Calculator
Quartiles & IQR
Quartiles & IQR
Frequency Table
Frequency Table
Correlation (r)
Correlation (r)
Normal Probability
Normal Probability
Z-Score Calculator
Z-Score Calculator
Confidence Interval
Confidence Interval
Sample Size
Sample Size
Mark & Recapture
Mark & Recapture
P-Value Calculator
P-Value Calculator
Percentage and ratio calculators
Percentage Calc
Percentage Calc
Percent Change
Percent Change
Percent Difference
Percent Difference
Percent Error
Percent Error
Ratio Calculator
Ratio Calculator
Discount Calculator
Discount Calculator
Sales Tax Calculator
Sales Tax Calculator
Margin Calculator
Margin Calculator
Speed calculators
Speed Calculator
Speed Calculator
Density and concentration calculators
Density
Density
Molarity
Molarity
Molar Mass
Molar Mass
Physics and electricity calculators
Ohm's Law
Ohm's Law
Watts to Amps
Watts to Amps
Resistor Colors
Resistor Colors
Voltage Drop
Voltage Drop
Unit conversion calculators
Weight Converter
Weight Converter
Shoe Size Converter
Shoe Size Converter
Integer and signed number calculators
Long Division
Long Division
LCM Calculator
LCM Calculator
GCF Calculator
GCF Calculator
Integer Calculator
Integer Calculator
Prime Factorization
Prime Factorization
Diophantine Solver
Diophantine Solver
Modulo Calculator
Modulo Calculator
Factor Calculator
Factor Calculator
Roman Numerals
Roman Numerals
Fraction, decimal and rounding calculators
Fraction Calculator
Fraction Calculator
Mixed Numbers
Mixed Numbers
Simplify Fractions
Simplify Fractions
Fraction to Decimal
Fraction to Decimal
Decimal to Fraction
Decimal to Fraction
Rounding
Rounding
Equation and inequality calculators
Linear Equation
Linear Equation
Linear Systems
Linear Systems
Quadratic Formula
Quadratic Formula
Absolute Value
Absolute Value
Quadratic Inequality
Quadratic Inequality
Polynomial calculators
Binomial Theorem
Binomial Theorem
Square root and nth root calculators
Simplify Radicals
Simplify Radicals
Nth Root
Nth Root
Exponent and logarithm calculators
Exponents
Exponents
Log Calculator
Log Calculator
Number of Digits
Number of Digits
Scientific Notation
Scientific Notation
Sci. Notation Math
Sci. Notation Math
Half-Life
Half-Life
Complex number calculators
Complex Numbers
Complex Numbers
Polar Form
Polar Form
De Moivre
De Moivre
Function and graph calculators
Slope Calculator
Slope Calculator
Linear Function
Linear Function
Direct & Inverse Variation
Direct & Inverse Variation
y = ax² Calculator
y = ax² Calculator
Distance Formula
Distance Formula
3D Distance
3D Distance
Section Formula
Section Formula
Point to Line
Point to Line
Lat/Long Distance
Lat/Long Distance
Complete the Square
Complete the Square
Circle Equation
Circle Equation
Conic Sections
Conic Sections
Polar Coordinates
Polar Coordinates
Sequence calculators
Arithmetic Sequence
Arithmetic Sequence
Geometric Sequence
Geometric Sequence
Fibonacci Sequence
Fibonacci Sequence
Recurrence Relation
Recurrence Relation
Vector calculators
Vector Calculator
Vector Calculator
Cross Product
Cross Product
Matrix calculators
Matrix Calculator
Matrix Calculator
Determinant
Determinant
Inverse Matrix
Inverse Matrix
Plane geometry calculators
Sin Cos Tan
Sin Cos Tan
Degrees ⇔ Radians
Degrees ⇔ Radians
a sin θ + b cos θ
a sin θ + b cos θ
Triangle Solver
Triangle Solver
Triangle Area
Triangle Area
Right Triangle
Right Triangle
Pythagorean Theorem
Pythagorean Theorem
Polygon Angles
Polygon Angles
Scale Factor
Scale Factor
Parallel Lines
Parallel Lines
Rectangle Area
Rectangle Area
Parallelogram Area
Parallelogram Area
Trapezoid Area
Trapezoid Area
Circle Calculator
Circle Calculator
Sector Area
Sector Area
Inscribed Angle
Inscribed Angle
Ellipse Area
Ellipse Area
Solid geometry calculators
Cube Volume
Cube Volume
Cube Surface Area
Cube Surface Area
Box Volume
Box Volume
Box Surface Area
Box Surface Area
Cylinder Volume
Cylinder Volume
Cylinder Surface
Cylinder Surface
Sphere Volume
Sphere Volume
Sphere Surface
Sphere Surface
Spherical Cap Volume
Spherical Cap Volume
Cap Surface Area
Cap Surface Area
Ellipsoid Volume
Ellipsoid Volume
Ellipsoid Surface
Ellipsoid Surface
Pyramid Volume
Pyramid Volume
Pyramid Surface
Pyramid Surface
Cone Volume
Cone Volume
Cone Surface Area
Cone Surface Area
Frustum Volume
Frustum Volume
Frustum Surface Area
Frustum Surface Area
Pipe Volume
Pipe Volume
Capsule Volume
Capsule Volume
Capsule Surface Area
Capsule Surface Area
Date and time calculators
Age Calculator
Age Calculator
Days Between Dates
Days Between Dates
Date Calculator
Date Calculator
Hours From Now
Hours From Now
Day of the Week
Day of the Week
Time Calculator
Time Calculator
Time Zone Converter
Time Zone Converter
Hours Calculator
Hours Calculator
Time Duration
Time Duration
Time Card
Time Card
Finance and economics calculators
Compound Interest
Compound Interest
Simple Interest
Simple Interest
Interest Calculator
Interest Calculator
TVM Calculator
TVM Calculator
Present Value
Present Value
Future Value
Future Value
ROI Calculator
ROI Calculator
IRR Calculator
IRR Calculator
Payback Period
Payback Period
Average Return
Average Return
GDP Calculator
GDP Calculator
Web marketing and ad metric calculators
CTR Calculator
CTR Calculator
Conversion Rate
Conversion Rate
CPC, CPM & CPA
CPC, CPM & CPA
ROAS Calculator
ROAS Calculator
Break-Even CPA
Break-Even CPA
LTV Calculator
LTV Calculator
CAC Calculator
CAC Calculator
Churn Rate
Churn Rate
A/B Test Calc
A/B Test Calc
A/B Sample Size
A/B Sample Size
SEO Traffic
SEO Traffic
Break-Even Point
Break-Even Point
Markup vs. Margin
Markup vs. Margin
CAGR Calculator
CAGR Calculator
Health and fitness calculators
BMI Calculator
BMI Calculator
Sleep Calculator
Sleep Calculator
Calorie Calculator
Calorie Calculator
BMR Calculator
BMR Calculator
TDEE Calculator
TDEE Calculator
Ideal Weight
Ideal Weight
Body Fat Calculator
Body Fat Calculator
Lean Body Mass
Lean Body Mass
Calories Burned
Calories Burned
Protein Intake
Protein Intake
Macro Calculator
Macro Calculator
Carb Calculator
Carb Calculator
Fat Intake
Fat Intake
Child Height
Child Height
Sports calculators
Golf Handicap
Golf Handicap
Pace Calculator
Pace Calculator
1RM Calculator
1RM Calculator
Target Heart Rate
Target Heart Rate
Weather calculators
Heat Index
Heat Index
Wind Chill
Wind Chill
Dew Point
Dew Point
Computer calculators
Base Converter
Base Converter
Subnet Calculator
Subnet Calculator
Download Time
Download Time
Household energy and budget calculators
Electricity Cost
Electricity Cost
kWh to Cost
kWh to Cost
Yearly kWh to Cost
Yearly kWh to Cost
AC Size (BTU)
AC Size (BTU)
AC Running Cost
AC Running Cost
Heating Costs
Heating Costs
Gas vs Electric
Gas vs Electric
LED Savings
LED Savings
Salary Calculator
Salary Calculator
Budget Calculator
Budget Calculator
Car calculators
Trip Gas Cost
Trip Gas Cost
EV Charging Cost
EV Charging Cost
EV vs Gas Cost
EV vs Gas Cost
MPG Calculator
MPG Calculator
Tire Size
Tire Size
Solar power and battery calculators
Solar Output
Solar Output
Solar Panel Count
Solar Panel Count
Solar Payback
Solar Payback
Battery Size
Battery Size
Home and DIY calculators
Tile Calculator
Tile Calculator
Stair Calculator
Stair Calculator
Concrete Volume
Concrete Volume
Wall Area
Wall Area
Wallpaper Rolls
Wallpaper Rolls
Paint Calculator
Paint Calculator
Flooring Needed
Flooring Needed
Exterior Walls
Exterior Walls
Gravel Needed
Gravel Needed
Mortar Mix
Mortar Mix
Slope Grade
Slope Grade
Lumber Cut List
Lumber Cut List
Lot Coverage/FAR
Lot Coverage/FAR
Sheet Vinyl Roll
Sheet Vinyl Roll
Insulation Needed
Insulation Needed
Curtain Size
Curtain Size
TV Size & Distance
TV Size & Distance
Soil Needed
Soil Needed
Sod Needed
Sod Needed
Block Calculator
Block Calculator
Brick Calculator
Brick Calculator
Deck Materials
Deck Materials
Ramp Length
Ramp Length
Pilot Hole Size
Pilot Hole Size
Room Ventilation
Room Ventilation
Paint Thinning
Paint Thinning
Baseboard & Trim
Baseboard & Trim
Blind Size
Blind Size
Picture Hanging
Picture Hanging
Drain Slope
Drain Slope
Screw Calculator
Screw Calculator
Board Feet
Board Feet
Fence Calculator
Fence Calculator
Wood Shrinkage
Wood Shrinkage
Caulk Calculator
Caulk Calculator
Heat Loss
Heat Loss
Furniture Fit
Furniture Fit
Moving Boxes
Moving Boxes
Storage Capacity
Storage Capacity
Plywood Cuts
Plywood Cuts
Shelf Sag
Shelf Sag

Least Common Multiple (LCM) Calculator

Enter 2 or more numbers separated by commas (,). You can find the LCM of 3 or more numbers at once, and the steps with prime factorization and the greatest common factor (GCF) are shown too.

Enter 2 or more positive whole numbers separated by commas (for example, 4, 6). 0, decimals and negative numbers cannot be used.
Result
Enter your numbers separated by commas in the field on the left and press "Calculate". The result will appear here.

What you can do on this page

  • Enter 2 or more numbers separated by commas (,) and get the least common multiple (LCM) on the spot
  • Not only "What is the LCM of 4 and 6?" but also 3 or more numbers at once, such as "What is the LCM of 12, 18 and 30?"
  • The steps show the prime factorization of each number, so you see why the answer is what it is, not just the answer
  • The greatest common factor (GCF) is shown at the same time for reference
  • A plain-language explanation of the formulas and copy-and-paste formulas for Excel, Google Sheets and Python are all on this page
Only positive whole numbers (1, 2, 3, …) can be entered. The least common multiple is defined for positive whole numbers, so 0, decimals and negative numbers cannot be used.

What is this calculation used for?

Finding a common denominator to add or subtract fractions (its biggest use)

To calculate \(\dfrac{1}{4} + \dfrac{1}{6}\), the denominators 4 and 6 have to be made the same. The least common denominator is the LCM, \(\mathrm{lcm}(4,6) = 12\), so the sum is \(\dfrac{3}{12} + \dfrac{2}{12} = \dfrac{5}{12}\).
Multiplying the denominators to get 24 also works, but the LCM keeps the numbers small and makes simplifying easier at the end. From elementary school math to everyday work, this is where the LCM is used most.

Finding when buses or trains next leave at the same time

Two bus routes leave the same stop together, one every 12 minutes and one every 18 minutes. They next leave together after \(\mathrm{lcm}(12,18) = 36\) minutes.
The moment when two things that repeat on different cycles line up is given by the LCM. It is a classic word problem in school math, and a practical tool for thinking about timetables and other schedules.

Buying hot dogs and buns so none are left over

Hot dogs come in packs of 10 and buns in packs of 8. To have exactly the same number of each, the fewest you can buy is \(\mathrm{lcm}(10,8) = 40\) of each, which is 4 packs of hot dogs and 5 packs of buns.
Matching things that come in different pack sizes happens everywhere, from shopping for a cookout to ordering parts for a factory.

Designing gears (machines and clocks)

A gear with 12 teeth turns with a gear with 18 teeth. The two teeth that touched at the start meet again after \(\mathrm{lcm}(12,18) = 36\) teeth have passed (3 turns of the small gear and 2 turns of the large one).
In machine design, the tooth counts are often chosen to be relatively prime to make the LCM large, so the same pairs of teeth do not keep hitting each other and wear unevenly.

When 13-year and 17-year cicadas come out together (nature)

In the eastern US, some broods of periodical cicadas come out of the ground every 13 years and others every 17 years. A 13-year brood and a 17-year brood that come out in the same year will next do so after \(\mathrm{lcm}(13,17) = 221\) years. This happened in 2024, for the first time since 1803.
Because 13 and 17 are both prime, their LCM is simply \(13 \times 17\). How long it takes for things with different cycles to line up again is exactly what the LCM tells you.

Formula

LCM of two numbers (using the GCF)
Standard notation (the usual math form)
\(\mathrm{lcm}(a,\,b)\) \(=\) \(a\) \(\times\) \(b\) \(\div\) \(\gcd(a,\,b)\)
In words (symbols replaced with words)
④ \(\mathrm{lcm}(a,b)\): least common multiple \(=\) ① \(a\): first number \(\times\) ② \(b\): second number \(\div\) ③ \(\gcd(a,b)\): greatest common factor
The formula in words
① Multiply the \(a\): first number
② by the \(b\): second number
③ divide by the \(\gcd(a,b)\): greatest common factor
④ and you get the \(\mathrm{lcm}(a,b)\): least common multiple
Quick example
The LCM of 4 and 6 (their GCF is 2) is
LCM of 4 and 6 \(=\) first number (4) \(\times\) second number (6) \(\div\) GCF (2)
\(4 \times 6 \div 2 = 24 \div 2 = 12\)
Key idea
If you just multiply the two numbers, the part they have in common (the greatest common factor) is counted twice. Dividing by it once removes the extra copy, and what is left is the least common multiple. When the GCF is 1 (the numbers are relatively prime), dividing by 1 changes nothing, so the LCM is simply the product \(\mathrm{lcm}(a,b) = a \times b\) (for 8 and 9, \(8 \times 9 = 72\)).
Using prime factorization (works for 3 or more numbers)
Standard notation (the usual math form)
\(L\) \(=\) \(p_1^{\,a_1} \times p_2^{\,a_2} \times \cdots \times p_k^{\,a_k}\)
In words (symbols replaced with words)
② \(L\): least common multiple \(=\) ① product of the highest power of each prime that appears
The formula in words
① Write each number as a product of primes and take the product of the highest power of each prime that appears
② to get the \(L\): least common multiple
Quick example
For the LCM of 12, 18 and 30: the prime factorizations are \(12 = 2^2 \times 3\), \(18 = 2 \times 3^2\) and \(30 = 2 \times 3 \times 5\), and the highest powers of the primes 2, 3 and 5 are \(2^2\), \(3^2\) and \(5\), so
LCM of 12, 18 and 30, \(L\) \(=\) product of the highest powers \(2^2 \times 3^2 \times 5\)
\(2^2 \times 3^2 \times 5 = 4 \times 9 \times 5 = 180\)
Key idea
Why the highest exponent? Because the least common multiple has to be a multiple of every one of the numbers. For example, to be a multiple of \(12 = 2^2 \times 3\), it needs two 2s, so the exponent of 2 is set to 2, the largest one that appears. For each prime, match the number that needs it most: that is the whole idea of this method. The steps shown by the calculator on this page also use this prime factorization method.
LCM of 3 or more numbers (two at a time)
Standard notation (the usual math form)
\(\mathrm{lcm}(a,\,b,\,c)\) \(=\) \(\mathrm{lcm}(m,\,c)\)
\(m\) \(=\) \(\mathrm{lcm}(a,\,b)\)
In words (symbols replaced with words)
③ LCM of all three numbers \(=\) ② LCM of \(m\) and \(c\)
① \(m\): LCM of \(a\) and \(b\) \(=\) \(\mathrm{lcm}(a,b)\): LCM of \(a\) and \(b\)
The formula in words
① First, find the \(m\): LCM of \(a\) and \(b\)
② then find the LCM of \(m\) and \(c\)
③ and that is the LCM of all three numbers (for 4 or more numbers, just keep repeating the same step)
Quick example
For the LCM of 12, 18 and 30, first find the LCM of 12 and 18 (36), then the LCM of that 36 and 30:
LCM of 12, 18 and 30 \(=\) LCM of "the LCM of 12 and 18 (36)" and 30
\(\mathrm{lcm}(12,\,18) = 36\)
\(\mathrm{lcm}(36,\,30) = 180\)
Key idea
You can start with any two of the numbers and the answer is the same (the order does not change the result). The calculator on this page also uses this two-at-a-time method to handle any number of inputs.
The basic way to find the least common multiple is to write each number as a product of primes, pick the highest power of each prime that appears, and multiply them. For two numbers, the shortcut is "the product of the two numbers divided by their GCF". For 3 or more numbers, find the LCM two at a time.

Symbols and terms

Symbols

\(\mathrm{lcm}(a,b)\) L C M of a and b The least common multiple of \(a\) and \(b\). It comes from the first letters of "least common multiple" and is also written in capitals, LCM.
\(\gcd(a,b)\) G C D of a and b The greatest common factor of \(a\) and \(b\). The symbol comes from "greatest common divisor", another name for the same number. US schools usually call it the GCF (greatest common factor).
\(2^2\) two squared A power: the small raised number (the exponent) tells how many times the same number is multiplied. \(2^2 = 2 \times 2 = 4\) and \(3^2 = 3 \times 3 = 9\).
\(p_1, p_2, \ldots, p_k\) p sub 1, p sub 2 The primes that appear in the prime factorizations, from smallest to largest. The small lowered number (the subscript) tells which prime it is in the list.
\(a_1, a_2, \ldots, a_k\) a sub 1, a sub 2 For each prime, the largest exponent (number of times it is multiplied) that appears in any of the prime factorizations.
\(m\) m The LCM of the first two numbers, found along the way. It is used when finding the LCM of 3 or more numbers two at a time.

Terms

multiple A number times 1, 2, 3 and so on. The multiples of 6 are 6, 12, 18, 24, …
common multiple A multiple shared by two or more numbers. The common multiples of 4 and 6 are 12, 24, 36, … and they go on forever.
least common multiple (LCM) The smallest of the common multiples. This is the value this page finds.
factor A whole number that divides a number evenly. The factors of 12 are 1, 2, 3, 4, 6 and 12.
greatest common factor (GCF) The largest factor shared by two or more numbers. It is also called the greatest common divisor (GCD). It often goes hand in hand with the LCM, so this page shows it for reference.
prime number A whole number of 2 or more whose only factors are 1 and itself (2, 3, 5, 7, 11, …). 1 is not a prime number.
prime factorization Writing a whole number as a product of prime numbers only. Example - \(12 = 2 \times 2 \times 3 = 2^2 \times 3\).
relatively prime When the GCF of two numbers is 1 (they have no prime factor in common). The LCM of two relatively prime numbers is just their product.
least common denominator (LCD) The least common multiple of the denominators. To add or subtract fractions with different denominators, you rewrite them with the same denominator, and the LCD is the simplest one to use. This is where the LCM is used most often.

Good to know before you start

Here is what helps you use the calculation on this page with real understanding, not just by pressing the button.

Multiplication facts and division (Grade 3)
  • Knowing your multiplication facts quickly
  • Being able to tell things like "12 is divisible by 3" and "13 is not divisible by 3"
Multiples and factors (Grades 4–6)
  • Knowing the words multiple, common multiple, least common multiple, factor, common factor and greatest common factor
  • For small numbers, being able to list the multiples in order and find the ones they share
Common denominators (Grade 5)
  • Knowing that fractions with different denominators need the same denominator before you add them (the most familiar use of the LCM)
Prime numbers and prime factorization (Grades 4–6)
  • Knowing that a prime number has no factors other than 1 and itself
  • Being able to break a number into a product of primes, as in \(12 = 2 \times 2 \times 3\)
Exponents (Grade 6)
  • Being able to write repeated multiplication of the same number with a small raised number (the exponent), as in \(2 \times 2 = 2^2\)

How to calculate it in Excel

Copy the whole table below and paste it into cell A1 in Excel. It works as is.
Table to find the LCM of two numbers (using the GCF)
First number a 4
Second number b 6
LCM lcm(a, b) =B1*B2/GCD(B1,B2)
Table to find the LCM of 3 or more numbers
First number 12
Second number 18
Third number 30
LCM =LCM(B1,B2,B3)
Table to find the LCM two at a time
First number 12
Second number 18
Third number 30
First, LCM of the first two, m =LCM(B1,B2)
LCM of all three =LCM(B4,B3)
After pasting, the upper cells in column B are your inputs and the last row is calculated automatically.
"GCD" finds the greatest common factor and "LCM" finds the least common multiple in Excel. The LCM function does the prime factorization of formula 2 for you.
The first table shows 12 in B3, and the second table shows 180 in B4. Just replace the numbers with your own (the LCM function takes more numbers, such as "=LCM(B1,B2,B3,B4)").

How to calculate it in Google Sheets

Copy the whole table below and paste it into cell A1 in Google Sheets. It works as is.
Table to find the LCM of two numbers (using the GCF)
First number a 4
Second number b 6
LCM lcm(a, b) =B1*B2/GCD(B1,B2)
Table to find the LCM of 3 or more numbers
First number 12
Second number 18
Third number 30
LCM =LCM(B1,B2,B3)
Table to find the LCM two at a time
First number 12
Second number 18
Third number 30
First, LCM of the first two, m =LCM(B1,B2)
LCM of all three =LCM(B4,B3)
Google Sheets has the same LCM and GCD functions, so the formulas from Excel work as is. Copy the whole table, paste it into cell A1, and replace the numbers with your own.

How to calculate it in Python

import math

numbers = [330, 75, 450, 225]  # numbers to find the LCM of (2 or more)

least_common_multiple = math.lcm(*numbers)
greatest_common_divisor = math.gcd(*numbers)

print(f"Least common multiple (LCM): {least_common_multiple}")
print(f"(For reference) greatest common factor (GCF): {greatest_common_divisor}")
Runs with the standard library only (math.lcm needs Python 3.9 or later). "*numbers" passes the items of the list to the function one by one, so it works with any number of values. Change the numbers in the list at the top and run it.

How to write it in LaTeX and other math languages (copy and paste)

LCM of two numbers (using the GCF)
lcm(a, b) = a × b ÷ gcd(a, b)
\mathrm{lcm}(a, b) = \dfrac{a \times b}{\gcd(a, b)}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>lcm</mi><mo>&#x2061;</mo>
    <mrow><mo>(</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>)</mo></mrow>
    <mo>=</mo>
    <mfrac>
      <mrow><mi>a</mi><mo>&#xD7;</mo><mi>b</mi></mrow>
      <mrow><mi>gcd</mi><mo>&#x2061;</mo><mrow><mo>(</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>)</mo></mrow></mrow>
    </mfrac>
  </mrow>
</math>
lcm(a, b) = (a xx b) / (gcd(a, b))
a*b/GCD[a, b]
L := a*b/igcd(a, b);
L = a*b/gcd(a, b);
lcm(a, b) = (a × b)/gcd(a, b)
Using prime factorization (works for 3 or more numbers)
L = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k}
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>L</mi>
    <mo>=</mo>
    <msubsup><mi>p</mi><mn>1</mn><msub><mi>a</mi><mn>1</mn></msub></msubsup>
    <mo>&#xD7;</mo>
    <msubsup><mi>p</mi><mn>2</mn><msub><mi>a</mi><mn>2</mn></msub></msubsup>
    <mo>&#xD7;</mo>
    <mo>&#x22EF;</mo>
    <mo>&#xD7;</mo>
    <msubsup><mi>p</mi><mi>k</mi><msub><mi>a</mi><mi>k</mi></msub></msubsup>
  </mrow>
</math>
L = p_1^(a_1) xx p_2^(a_2) xx cdots xx p_k^(a_k)
Product[p[i]^a[i], {i, 1, k}]
L := product(p[i]^a[i], i = 1 .. k);
L = prod(p.^a);
L = p_1^(a_1) × p_2^(a_2) × ⋯ × p_k^(a_k)
LCM of 3 or more numbers (two at a time)
lcm(a, b, c) = lcm(lcm(a, b), c)
\mathrm{lcm}(a, b, c) = \mathrm{lcm}(\mathrm{lcm}(a, b),\ c)
<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
  <mrow>
    <mi>lcm</mi><mo>&#x2061;</mo>
    <mrow><mo>(</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>,</mo><mi>c</mi><mo>)</mo></mrow>
    <mo>=</mo>
    <mi>lcm</mi><mo>&#x2061;</mo>
    <mrow><mo>(</mo><mi>lcm</mi><mo>&#x2061;</mo><mrow><mo>(</mo><mi>a</mi><mo>,</mo><mi>b</mi><mo>)</mo></mrow><mo>,</mo><mi>c</mi><mo>)</mo></mrow>
  </mrow>
</math>
lcm(a, b, c) = lcm(lcm(a, b), c)
LCM[LCM[a, b], c]
L := ilcm(ilcm(a, b), c);
L = lcm(lcm(a, b), c);
lcm(a, b, c) = lcm(lcm(a, b), c)

How to have ChatGPT  do the calculation

You are a calculation assistant for whole numbers. Do the following calculation by actually running Python code, and base your answer only on the numbers from the execution result (do not answer by mental math or guessing).

For the four numbers 330, 75, 450 and 225, find each of the following:
1. The least common multiple (LCM)
2. The greatest common factor (GCF)
3. The prime factorization of each number

Show the formulas you used and the numbers from the execution result.

How to Use
  1. 1
    Enter your numbers
    Type the numbers you want to calculate with into the input fields
  2. 2
    Calculate
    Press the "Calculate" button
  3. 3
    Check the result
    The result appears on the spot. The same page also explains the idea behind the calculation and the formula
  DataChef Features
Easy and Free
Unlimited conversions for free.
No technical knowledge required.
Intuitive and user-friendly operation.
No Registration Required
Available immediately after access.
Can be used without registering personal information.
Safe and Secure
Fully SSL encrypted communication.
Automatic file deletion by clicking "download".
Fast
High-speed site access
and rapid file conversion.
No Watermark
No watermark.
No attribution required.
Commercial Use Available
Free for commercial use.
No need to contact us for commercial use permission.