UseCalcPro
Home
MathFinanceHealthConstructionAutoPetsGardenCraftsFood & BrewingTools
Blog
  1. Home
  2. Math

GCD & LCM Calculator

Find GCD and LCM with step-by-step solutions

GCD

12

LCM

144

Coprime

No

Find the GCD and LCM of three or more numbers at once.

GCD

12

LCM

144

Shared prime factors: 2, 3

Verification

48 × 36 = 1728

GCD × LCM = 12 × 144 = 1728

Formulas Used

Euclidean Algorithm

GCD(a, b) = GCD(b, a mod b), base case: GCD(a, 0) = a

Repeatedly divide and take remainders until the remainder is 0. The last non-zero remainder is the GCD.

Where:

a= First number (larger)
b= Second number (smaller)
mod= Modulo (remainder after division)

LCM via GCD

LCM(a, b) = |a × b| / GCD(a, b)

The LCM equals the absolute product of the two numbers divided by their GCD.

Where:

a= First number
b= Second number
GCD(a,b)= Greatest common divisor of a and b

Example Calculations

1GCD and LCM of 48 and 36

Inputs

Number 148
Number 236

Result

GCD12
LCM144
CoprimeNo

Using the Euclidean algorithm: 48 = 1 × 36 + 12, then 36 = 3 × 12 + 0. GCD = 12. LCM = (48 × 36) / 12 = 1728 / 12 = 144.

2GCD and LCM of 100 and 75

Inputs

Number 1100
Number 275

Result

GCD25
LCM300
CoprimeNo

100 = 1 × 75 + 25, then 75 = 3 × 25 + 0. GCD = 25. LCM = (100 × 75) / 25 = 7500 / 25 = 300.

3Coprime numbers: 17 and 13

Inputs

Number 117
Number 213

Result

GCD1
LCM221
CoprimeYes

17 = 1 × 13 + 4, 13 = 3 × 4 + 1, 4 = 4 × 1 + 0. GCD = 1 (coprime). LCM = 17 × 13 = 221.

Frequently Asked Questions

Q

What is the Greatest Common Divisor (GCD)?

The GCD of two or more numbers is the largest positive integer that divides each number without a remainder. For example, GCD(48, 36) = 12 because 12 is the largest number that evenly divides both 48 and 36.

  • GCD(48, 36) = 12 since 48/12 = 4 and 36/12 = 3
  • GCD(100, 75) = 25 since both are divisible by 25
  • GCD(17, 13) = 1 because both are prime (coprime)
  • Also called Greatest Common Factor (GCF) or Highest Common Factor (HCF)
Number PairGCDMethod
48, 3612Both divisible by 12
100, 7525Both divisible by 25
17, 131Coprime (no shared factors)
84, 5628Both divisible by 28
Q

What is the Least Common Multiple (LCM)?

The LCM of two or more numbers is the smallest positive integer that is divisible by each number. For example, LCM(4, 6) = 12 because 12 is the smallest number divisible by both 4 and 6.

  • LCM(4, 6) = 12, the first multiple shared by 4 and 6
  • LCM(3, 5) = 15 since 3 and 5 are coprime
  • LCM(12, 8) = 24, not 96 (which is 12 x 8)
  • Used for adding fractions with different denominators
  • Also used for scheduling recurring events
Number PairLCMCommon Use
4, 612Adding fractions 1/4 + 1/6
3, 515Scheduling every 3 and 5 days
12, 824Finding common denominators
15, 2060Time calculations (minutes)
Q

How does the Euclidean algorithm work?

The Euclidean algorithm finds the GCD by repeatedly dividing the larger number by the smaller and taking the remainder. When the remainder reaches 0, the last non-zero remainder is the GCD. For 48 and 36: 48 = 1 x 36 + 12, then 36 = 3 x 12 + 0, so GCD = 12.

  • Step 1: Divide larger by smaller, note remainder
  • Step 2: Replace larger with smaller, smaller with remainder
  • Step 3: Repeat until remainder is 0
  • Step 4: Last non-zero remainder is the GCD
  • Over 2,300 years old, one of the oldest known algorithms
StepDivisionRemainder
148 = 1 x 36 + 1212
236 = 3 x 12 + 00 (done)
ResultGCD = 12
Q

What is the relationship between GCD and LCM?

For any two positive integers a and b, the product of their GCD and LCM equals the product of the numbers themselves: GCD(a,b) x LCM(a,b) = a x b. This means LCM(a,b) = (a x b) / GCD(a,b), which is the most efficient way to compute LCM.

  • Formula: GCD(a,b) x LCM(a,b) = a x b
  • Example: GCD(48,36) x LCM(48,36) = 12 x 144 = 1,728 = 48 x 36
  • LCM = (a x b) / GCD, so compute GCD first
  • If GCD = 1 (coprime), then LCM = a x b
NumbersGCDLCMProduct Check
48, 361214412 x 144 = 1,728 = 48 x 36
15, 205605 x 60 = 300 = 15 x 20
7, 111771 x 77 = 77 = 7 x 11
Q

Where are GCD and LCM used in real life?

GCD is used to simplify fractions (e.g., 48/36 becomes 4/3 by dividing by GCD 12), tile floors with the largest square tile, and distribute items equally. LCM is used to find common denominators, synchronize schedules, and solve gear/pulley ratio problems.

  • Simplify fractions: 48/36 = 4/3 using GCD = 12
  • Tiling: largest square tile for a 48x36 room is 12x12
  • Schedules: buses every 15 and 20 min align every 60 min (LCM)
  • Music: rhythm patterns repeat at LCM of beat lengths
  • Cryptography: GCD is fundamental to RSA encryption
ApplicationUses GCD or LCMExample
Simplify fractionsGCD48/36 = 4/3
Common denominatorsLCM1/4 + 1/6 = 5/12
Floor tilingGCD48x36 room: 12x12 tiles
Schedule syncLCMBuses at 15 & 20 min: every 60 min

Related Calculators

Fraction Calculator

Add, subtract, multiply, and divide fractions

Prime Factorization

Find prime factors of any number

Ratio Calculator

Solve and simplify ratios and proportions

Percent Calculator

Calculate percentages quickly and accurately

Distance Calculator

Calculate the distance between two points in 2D or 3D using the distance formula. Shows squared distance, midpoint, components, and step-by-step work.

Logarithm Calculator

Calculate logarithms instantly with log base 10, natural log (ln), log base 2, and custom bases. Shows change of base formula and step-by-step solutions.

Related Resources

Fraction Calculator

Simplify fractions using GCD

Ratio Calculator

Work with ratios and proportions

Percent Calculator

Calculate percentages and proportions

Statistics Calculator

Descriptive statistics and data analysis

Last Updated: Mar 9, 2026

This calculator is provided for informational and educational purposes only. Results are estimates and should not be considered professional financial, medical, legal, or other advice. Always consult a qualified professional before making important decisions. UseCalcPro is not responsible for any actions taken based on calculator results.

UseCalcPro
FinanceHealthMath

© 2026 UseCalcPro