# GCD and LCM Calculator - With the Euclidean Algorithm Steps

> Free online GCD and LCM calculator: works with two or more integers, says whether they are coprime, shows each prime factorization and every Euclidean step.

- URL: https://qilingtools.com/en/math/gcd-lcm
- Category: Math Tools (https://qilingtools.com/en/math)
- Tags: [Math](https://qilingtools.com/en/tags/math), [Education](https://qilingtools.com/en/tags/education), [Algorithms](https://qilingtools.com/en/tags/algorithm)
- Last updated: 2026-10-26
- Price: Free, no sign-up
- Privacy: Runs locally in the browser; files are never uploaded

Find the greatest common divisor and least common multiple of as many integers as you like. Besides the answer you get a coprime check and the prime factorization of each number, and with exactly two inputs every step of the Euclidean algorithm is listed.

## How to use

1. Enter two or more integers separated by spaces, commas or line breaks
2. The GCD and LCM update as you type
3. With two numbers, the Euclidean algorithm steps appear below

## Features

- Any number of integers at once
- BigInt arithmetic, so the LCM never overflows
- Coprime check and prime factorizations
- Full Euclidean algorithm working for two numbers

## FAQ

### How does the Euclidean algorithm work?

Divide the larger number by the smaller, then divide the previous divisor by the remainder, and repeat until the remainder is 0. The last non-zero divisor is the GCD — every step is listed for you.

### How is the LCM computed?

For two numbers, LCM = a × b ÷ GCD(a, b); for more numbers the pairwise LCM is taken in turn.

### What does coprime mean?

Two numbers are coprime when their greatest common divisor is 1, for example 8 and 15.

### Can I use negative numbers?

Yes — signs are ignored and absolute values are used, as is standard in number theory.

## Related tools

- [Graphing Calculator](https://qilingtools.com/en/math/graph): Free online function graphing calculator: type sin(x), x^2 or 1/x and see the curve at once, with several functions, parametric and polar curves, PNG export.
- [Scientific Calculator](https://qilingtools.com/en/math/calculator): Free online scientific calculator: type 2*(3+4)^2, sin(pi/6) or log(8,2) and see the answer as you type, with degrees or radians and a history list.
- [Equation Solver](https://qilingtools.com/en/math/equation): Free online equation solver: enter coefficients for linear, quadratic (with discriminant, vertex and complex roots) and cubic equations, plus 2×2 systems.
- [Fraction Calculator](https://qilingtools.com/en/math/fraction): Free online fraction calculator: add, subtract, multiply and divide fractions with automatic reduction, plus fraction ↔ decimal with repeating digits.
- [Percentage Calculator](https://qilingtools.com/en/math/percentage): Free online percentage calculator: X% of Y, X as a percent of Y, increase and decrease, a value after a percentage change and the original behind it.
- [Prime Factorization](https://qilingtools.com/en/math/prime): Free online prime factorization: factor an integer with exponents, list every divisor and their sum, test primality with neighbouring primes, or list a range.
- [Statistics Calculator](https://qilingtools.com/en/math/statistics): Free online statistics calculator: paste a data set for the mean, median, mode, range, quartiles, variance, standard deviation, standard error and outliers.
- [Combinations](https://qilingtools.com/en/math/combination): Free online combination and permutation calculator: exact C(n,r), P(n,r) and n! with big integers, plus repetition variants and the total number of subsets.
