LifeTally
GCD and LCM of two integers
What are the greatest common divisor and least positive common multiple of your two positive whole numbers?
Find both exact integer results for the same pair of inputs.
Your two positive whole numbers
Use two positive integers. A divisor divides a number without a remainder; a positive multiple is a number times a positive integer. Swapping a and b leaves both results unchanged.
How the estimate works
The GCD is the largest positive integer dividing both inputs without a remainder. The LCM is the smallest positive integer divisible by both. With g = GCD(a,b), LCM(a,b) = (a ÷ g) × b. Both accepted inputs are required for both results, even when one input is 1.
OpenStax: greatest common factor ↗OpenStax: least common multiple ↗
The maximum input 9007199254740991 is our limit for exact whole-number input representation, not a mathematical bound or recommended value. This form covers exactly two positive integers. It excludes zero, negative numbers, fractions, polynomials and lists of three or more inputs. It does not list divisors, output prime factorizations, simplify fractions or schedule recurring events. It provides no unit conversion or real-world timing, fit or safety guarantee.
Check the filled example
Our chosen example: a = 84 and b = 132. Their GCD is 12: 84 = 12 × 7 and 132 = 12 × 11, and 7 and 11 have no common divisor greater than 1. The LCM is (84 ÷ 12) × 132 = 924, also 84 × 11 = 132 × 7. These are example inputs, not a recommendation.
Accepted input values
- First positive whole number a
- 84
- Second positive whole number b
- 132
Plan the next step
Use the GCD when you need the largest common integer divisor, or the LCM when you need the least positive common integer multiple. For separate arithmetic, open the standard calculator.
Open standard calculator →