Inputs
GCD2
Ready
The greatest common divisor of 4 and 6 is 2, the largest positive integer that divides both. The least common multiple is 12, the smallest positive integer that both divide. They are tied together: for two non-zero integers, |a × b| = GCD × LCM. Check it: 4 × 6 is 24, and 2 × 12 is 24.
The divisor comes from the Euclidean algorithm. Divide 6 by 4, remainder 2. Divide 4 by 2, remainder 0. The last non-zero remainder is the GCD. The LCM is then the product of the absolutes divided by that GCD, computed with exact integers so a large pair does not lose digits. Signs are ignored for both results. The GCD of −4 and 6 is still 2.
If either value is 0, the GCD is the absolute value of the other one, and the LCM is 0. Two zeros give GCD 0 and LCM 0. Both inputs have to be whole numbers. A fraction belongs on the fraction page, where the GCD is used quietly to reduce a result.
First value 4. Second value 6.
GCD 2. LCM 12. The product 24 equals 2 × 12.
Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.
6 divided by 4 leaves remainder 2. 4 divided by 2 leaves remainder 0. The GCD is 2.
Divide the product of the absolute values by the GCD. 24 / 2 is 12, the least common multiple of 4 and 6.
It is the first shared multiple. Processes that repeat every 4 and every 6 units line up again at 12.
No. Both results use absolute values. The GCD of −4 and 6 is 2, and the LCM is 12.
The GCD is the absolute value of the other number, and the LCM is 0. The product identity still holds because both sides are 0.