Explore our collection of 150+ developer tools, PDF editors, and image converters. Everything runs locally in your browser.
Ubify Financial Advisory Board
FINANCIAL ANALYSTS & CPA REVIEWERS
About This Tool
The Greatest Common Divisor (GCD) & Least Common Multiple (LCM) Calculator determines the greatest shared divisor and lowest common multiple of two positive integers using the classical Euclidean algorithm.
### Mathematical Foundations & Euclidean Algorithm The calculation relies on two fundamental number-theoretic principles: - **Euclidean Algorithm for Greatest Common Divisor**: Computes the GCD of two positive integers $a$ and $b$ ($a \ge b$) by repeated modulo division until remainder reaches zero: $$\gcd(a, b) = \begin{cases} a & \text{if } b = 0 \\ \gcd(b, a \bmod b) & \text{if } b > 0 \end{cases}$$ - **Fundamental Theorem for Least Common Multiple**: The product of two positive integers equals the product of their greatest common divisor and least common multiple: $$a \times b = \gcd(a, b) \times \text{LCM}(a, b)$$ Rearranging gives the exact formula implemented by the tool: $$\text{LCM}(a, b) = \frac{|a \times b|}{\gcd(a, b)}$$
### Worked Number-Theoretic Example Finding the GCD and LCM for $a = 48$ and $b = 72$: - **Step 1: Euclidean Divisor Steps**: - $72 \bmod 48 = 24$ - $48 \bmod 24 = 0$ - Remainder is $0$, terminating the algorithm with $\mathbf{\gcd(48, 72) = 24}$. - **Step 2: Least Common Multiple**: $$\text{LCM}(48, 72) = \frac{48 \times 72}{24} = \frac{3{,}456}{24} = \mathbf{144}$$ - **Verification**: $48 \times 3 = 144$ and $72 \times 2 = 144$, confirming 144 is the smallest shared integer multiple.
### In-Browser Processing & Privacy Note All recursive Euclidean iterations and arithmetic evaluations execute instantaneously inside your client-side browser runtime. No input numbers, math assignments, or calculation logs are sent across external networks.
How to Use
- 1
Enter the first positive integer in the Number A field.
- 2
Enter the second positive integer in the Number B field.
- 3
Review the calculated Greatest Common Divisor (GCD) in the primary result card.
- 4
Examine the corresponding Least Common Multiple (LCM) in the secondary result card.
Frequently Asked Questions
What is the practical difference between GCD and LCM?
The Greatest Common Divisor (GCD) is the largest integer that divides both numbers evenly without a remainder, essential for simplifying fractions. The Least Common Multiple (LCM) is the smallest integer that is a multiple of both numbers, essential for finding common denominators.
Can this tool calculate GCD for negative numbers?
Yes. The calculation engine applies the absolute value of each input, since mathematical divisibility is defined over positive magnitudes.
Does this calculator transmit numbers to an external server?
No. The Euclidean algorithm executes 100% locally in your client-side browser session.