GCD and LCM Calculator
One set of integers per line, e.g. 12, 18, 24 - batch GCD and LCM with Euclidean steps
Output:
Formula:
Separator:
Calculation Result
Download CSV
| No. | Value | GCD | LCM | Euclidean steps |
|---|
Introduction to the tool and how to use it
This GCD and LCM calculator processes one group of integers per line for batch calculation, suited to reducing fractions, finding common denominators, fraction arithmetic, and number-theory practice.
For a whole group, GCD is the largest common divisor of all numbers, LCM the smallest common multiple; when 0 appears, LCM is recorded as 0. All arithmetic uses BigInt, so integers with 20 or more digits stay exact as well.
For a whole group, GCD is the largest common divisor of all numbers, LCM the smallest common multiple; when 0 appears, LCM is recorded as 0. All arithmetic uses BigInt, so integers with 20 or more digits stay exact as well.
How to use
- Enter one group of integers per line, separated by commas or spaces, such as
12, 18, 24. - Choose the output (both, GCD only, or LCM only) and optionally tick to show Euclidean algorithm steps.
- Click Calculate; the results table shows GCD, LCM, and algorithm steps, with one-click copy and CSV export.
GCD and LCM
GCD and LCM of 48 and 60
The GCD of 48 and 60 is 12 and the LCM is 240.
- GCD12
- LCM240
Euclidean algorithm steps
| Step | Equation |
|---|---|
| 1 | 60 = 1 × 48 + 12 |
| 2 | 48 = 4 × 12 + 0 |
- Euclid's algorithm: divide the larger number by the smaller, then divide the smaller by the remainder and repeat until the remainder is 0. The last non-zero remainder is the GCD.
- LCM = the product of the two numbers divided by their GCD.
Common inputs
Message board
All messages →-
No one has spoken up yet — want to go first?