GCD Calculator
Calculate the Greatest Common Divisor (GCD), also known as Highest Common Factor (HCF) or Greatest Common Factor (GCF), between two integers using Euclid’s algorithm.
First positive integer
Second positive integer
Largest positive integer that divides both numbers without remainder
How to Use This Calculator
- Enter the first integer (A).
- Enter the second integer (B).
- View the GCD, coprime status, and dual LCM equivalent.
Formula & Calculation Methodology
The Euclidean algorithm repeatedly replaces the larger number by the remainder of dividing the larger by the smaller until the remainder is zero.
Worked Example
Finding GCD of 48 and 180
Finding GCD of coprime numbers 13 and 27
Frequently Asked Questions
What is the relationship between GCD and LCM?↓
For any two positive integers, their product always equals the product of their GCD and LCM: a × b = gcd(a, b) × lcm(a, b).
What does it mean if two numbers are coprime?↓
Two numbers are coprime (or relatively prime) if their only common positive factor is 1 (i.e. gcd(a, b) = 1).
Can negative numbers be passed to GCD?↓
By standard mathematical definition, the greatest common divisor is strictly a positive integer, so absolute values are evaluated.
What is a limitation of manual prime factorization for GCD?↓
Factoring large numbers by hand is extremely tedious; the Euclidean algorithm computes GCD in logarithmic time without factoring.
Related Calculators
Source Citation & Disclaimer
Informational tool only; not licensed tax, legal, or financial advice.