📐

Greatest Common Divisor & Euclidean Algorithm Calculator

Math Free Instant Private
Math

### Number Theory: The Euclidean Algorithm & Bézout's Identity 1. **The Euclidean Algorithm**: Described in Euclid's *Elements* (c. 300 BC), it is one of the oldest numerical algorithms in history.

Reviewed by Miss Saima · MA Mathematics
Last updated:
Editorial Guidelines

⚙ Input Values

📊 Results

GCD / HCF Solution Summary
GCD(48, 180) = 12 ➔ LCM: 720 | Coprime: No | Bézout: 48(4) + 180(-1) = 12
Greatest Common Divisor (GCD / HCF)
GCD = 12 (Highest Common Factor)
Coprime / Relatively Prime Classification
NOT COPRIME (Share greatest common factor of 12)
Associated Least Common Multiple (LCM)
LCM = 720 (Least Common Multiple)
Bézout's Identity Linear Combination (ax + by = GCD)
48(4) + 180(-1) = 12
Step-by-Step Euclidean Algorithm Division Chain
180 = 48 × 3 + 36 ➔ 48 = 36 × 1 + 12 ➔ 36 = 12 × 3 + 0
✦ Number Theory & Euclidean Geometry Diagnostic
Euclidean Greatest Common Divisor Model (GCD of {48, 180}): [1. Greatest Common Divisor]: The largest positive integer dividing all inputs evenly is **GCD = 12** (Highest Common Factor HCF). [2. Least Common Multiple]: The smallest positive integer divisible by all inputs is **LCM = 720**. [3. Relative Primality]: **NOT COPRIME (Share greatest common factor of 12)**. [4. Extended Euclidean Algorithm (Bézout's Identity)]: Expressed as **48(4) + 180(-1) = 12**. [5. Division Chain]: **180 = 48 × 3 + 36 ➔ 48 = 36 × 1 + 12 ➔ 36 = 12 × 3 + 0**.
Embed on Your Website

Copy and paste this code into your website.

<iframe src="https://calcusolve.com/calculator/gcd-calculator?embed=true" width="100%" height="600" frameborder="0" loading="lazy" title="Greatest Common Divisor & Euclidean Algorithm Calculator"></iframe>

📐 Formula

Euclidean Algorithm & GCD equations:
Euclidean Algorithm: (a, b) = (b, a b) (with (a, 0) = a)
Bézout's Identity: a × x + b × y = (a, b)
Relation to LCM: lcm(a, b) = (|a × b| ÷ (a, b))
Multi-Number GCD: (a, b, c) = ( (a, b), c)

💡 Practical Example

✅

For example, finding the Greatest Common Divisor of \(48\text{ and } 180\): Using the Euclidean division chain: \, \, \. \(\mathbf{\gcd(48, 180) = 12}\). The associated \(\mathbf{\operatorname{lcm}(48, 180) = \frac{48 \times 180}{12} = 720}\). Bézout's identity: \(48(-7) + 180(2) = 12\).

📖 About Greatest Common Divisor & Euclidean Algorithm Calculator

Number Theory: The Euclidean Algorithm & Bézout's Identity

  • The Euclidean Algorithm: Described in Euclid's Elements (c. 300 BC), it is one of the oldest numerical algorithms in history, computing GCDs in O(((a, b))) time without factoring numbers.
  • Bézout's Identity: For any nonzero integers a and b, there exist integers x and y such that forming the foundation of modular inverse computations in RSA public-key cryptography.

How to Use This Calculator

Enter your First Integer (Number A) (e.g. 48), Second Integer (Number B) (e.g. 180), Third Integer (Number C [Optional]) (e.g. 0 (Leave 0 if only 2 numbers)), and Fourth Integer (Number D [Optional]) (e.g. 0 (Leave 0 if not used)). Results update instantly as you type — adjust any value to compare scenarios.

The Formula

Euclidean Algorithm \& GCD equations:

Euclidean Algorithm: (a, b) = (b, a b) (with (a, 0) = a)

Bézout's Identity: a · x + b · y = (a, b)

Relation to LCM: lcm(a, b) = (|a × b|) / ((a, b))

Multi-Number GCD: (a, b, c) = ((a, b), c)

Worked Example

For example, finding the Greatest Common Divisor of 48 and 180: Using the Euclidean division chain: . (48, 180) = 12. The associated lcm(48, 180) = (48 × 180) / (12) =

  • Bézout's identity: 48(-7) + 180(2) =

12.

Understanding Your Result

Evaluate your result in the context of your specific use case and relevant industry standards or reference values. A single calculated result is a starting point — test two to three scenarios to understand how sensitive the outcome is to your key input assumptions. For high-stakes decisions, verify your result against a secondary source or subject-matter expert before acting.

💡 Mathematical Rigor & Applied Context

  • This calculator applies exact mathematical definitions following conventions established by NIST and international standards bodies.
  • Rounding errors accumulate across multi-step calculations. For precision-critical work, maintain extra significant figures through all intermediate steps.
  • Many mathematical concepts have multiple valid formulations — if a result seems unexpected, verify which convention or definition applies to your context.
  • Dimensional analysis (unit tracking) is the fastest way to catch formula errors. Every term in an equation must have consistent, compatible units.
  • Numerical methods used in digital calculators introduce floating-point precision limits (~15 significant digits for IEEE 754 double precision).
  • For statistical and probabilistic calculations, always specify whether you are working with population parameters or sample statistics — formulas differ.
  • Visualizing a problem geometrically or testing with known boundary values (zero, infinity, negative) reveals hidden errors faster than algebraic checking.
  • When in doubt, validate your result against a simplified hand calculation or a published worked example from a textbook or standards document.

Results are for informational and educational purposes only. Always verify critical decisions with a qualified professional.

❓ Frequently Asked Questions

What is the Greatest Common Divisor (GCD)?

The GCD (also known as Highest Common Factor HCF) is the largest positive integer that divides two or more integers without leaving a remainder.

How does the Euclidean algorithm work?

The Euclidean algorithm repeatedly replaces the larger number with the remainder of dividing the larger number by the smaller number until the remainder is zero.

What are coprime numbers?

Two integers are coprime (or relatively prime) if their greatest common divisor is 1 (they share no common prime factors).

What is the relationship between GCD and LCM?

For any two positive integers a and b, GCD(a, b) × LCM(a, b) = a × b.

What is Bézout's identity in number theory?

Bézout's identity states that the GCD of two integers a and b can always be written as a linear combination ax + by = GCD(a, b) for some integers x and y.

Try Other Calculators