GCD Calculator - Greatest Common Divisor - Online Finder
Có thể bạn quan tâm
Search for a tool 🔎︎ Search a tool on dCode ⏎ Browse the full dCode tools' list GCD (Greatest Common Divisor) Tool to compute GCD. The greatest common divisor of two integers is the greatest positive integer which divides these two integers simultaneously.
ResultsGCD (Greatest Common Divisor) - dCode
Tag(s) : Arithmetics
SharedCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
Need Help ?Please, check our dCode Discord community for help requests!NB: for encrypted messages, test our automatic cipher identifier!
Message for dCode's team: Send this message!Feedback and suggestions are welcome so that dCode offers the best 'GCD (Greatest Common Divisor)' tool for free! Thank you!
GCD (Greatest Common Divisor)- Mathematics
- Arithmetics
- GCD (Greatest Common Divisor)
GCD of 2 or more numbers Calculator
Numbers for GCD calculation8 40 100| Method | Show GCD result only (no steps) List of Divisors (and those common) Euclidean Divisions Prime Factors (Decomposition) |
LCM Calculator
⮞ Go to: LCM Calculator (Lowest Common Multiple)List of Divisors
⮞ Go to: Divisors of a NumberAnswers to Questions (FAQ)
What is the GCD? (Definition)
The GCD (for greater common divisor) of two integers is the largest natural integer is a divisor of these two integers.
How to calculate the GCD? (Algorithm)
GCD Method 1: list divisors of each number and find the greatest common divisor.
Example: GCD of the numbers 10 and 12.10 has for divisors' list: 1,2,5,1012 has for divisors' list: 1,2,3,4,6,12The greatest common divisor (of these lists) is 2 (The largest number in all lists).So, GCD(10,12) = 2
GCD Method 2: use Euclidean algorithm (prefered method for calculators)
Step 1. Make an euclidean division of the largest of the 2 numbers A by the other one B, to find a dividend D and a remainder R. Keep the numbers B and R.
Step 2. Repeat step 1 (with numbers kept, B becomes the new A and R becomes the new B) until the remainder is zero.
Step 3. GCD of A and B is equal to the last non zero remainder.
Example: A=12 and B=10, and (step 1) compute A/B = 12/10 = 1 remainder R=2.(step 2) 10/2 = 5 remainder 0, the remainder is zero.The last remainder not null is 2, so GCD(10, 12) = 2.
GCD Method 3: use prime factor decomposition
GCD is the multiplication of common factors (e.g. the product of all numbers presents in all decompositions).
Example: Numbers 10 and 12 which prime decomposition are: 10 = 2 * 5 and 12 = 2 * 2 * 3. The only common factor is 2. So GCD(10,12) = 2
GCD Method 4: knowing the GCD, use the formula GCD(a, b) = a * b / LCM(a, b)
Example: The LCM (least common multiple) of 10 and 12 is 60, so GCD(10, 12) = 10 * 12 / 60 = 2
How to find the GCD with multiple numbers? (GCD of 3 numbers or more)
GCD Method 1: list divisors of the numbers and find the greatest common divisor.
Example: Search for the GCD of the numbers 10, 20 and 25.10 has for divisors 1,2,5,10.20 has for divisors 1,2,4,5,10,20.25 has for divisors 1,5,25.The greatest common divisor is 5.
GCD Method 2: use the formula GCD(a,b,c) = GCD( GCD (a,b) , c )
Example: GCD (10,20) = 10
Example: GCD (10,20,25) = GCD( GCD(10,20), 25) = GCD(10, 25) = 5
GCD Method 3: use prime factor decomposition
Example: 10 = 2 * 520 = 2 * 2 * 525 = 5 * 5
GCD is the multiplication of common factors
Example: GCD (10,20,25) = 5
Why calculate GCD of numerator and denominator?
To simplify a fraction, it is possible to divide the numerator and demonimator by their GCD to obtain an irreducible fraction.
What is the definition of two relatively prime numbers?
Two numbers $ a $ and $ b $ are said to be relatively prime if there is no number except $ 1 $ which is both the divisor of $ a $ and $ b $.
Two numbers $ a $ and $ b $ are said to be co-prime if their GCD is $ 1 $: $ gcd(a,b) = 1 $
What is the différence between GCD and HCF?
HCF stands for highest common factor, it is exactly the same thing as GCD.
How to calculate GCD with negative integers?
The program ignores negative numbers. To be rigorous mathematically, it depends on the definition of PGCD, defined over N*, it is always positive, defined over Z* it can be negative, but it is the same, with a -1 coefficient. By convention, only the positive value is given. $$ GCD(a,b) = GCD(-a,b) = GCD(a,-b) = GCD(-a,-b) $$
Example: In this second case, for all solution, the opposite is valid: GCD(6,9) = GCD(-6,9) = GCD(6,-9) = GCD(-6,-9) = 3 (ou -3).
How to calculate GCD with subtractions?
An alternative method to euclidean divisions using successive subtractions based on the property $$ gcd(a,b) = gcd(b,a) = gcd(b,a-b) = gcd(a,b-a) $$
Example: GCD(12, 10) = GCD(10, 12-10=2) = GCD(2, 10-2=8) = GCD(8, 8-2=6) = GCD(6, 8-6=2) = GCD(6, 6-2=4) = GCD(4, 6-4=2) = GCD(4, 4-2=2) = GCD(2, 2) = 2.
How to calculate GCD of 2 numbers knowing their product and their LCM?
Use the formula $ GCD(a,b) = (a \times b) / LCM(a, b) $
with $ a \times b $ the product of the 2 numbers and LCM their least common multiple
How to code a GCD algorithm?
// JAVASCRIPTfunction pgcd(a,b) { return (b==0)?a:pgcd(b,a%b);}// PHPfunction pgcd($a,$b) { return ($b==0)?$a:pgcd($b,$a%$b);}// Pythondef gcd(a, b): while b!=0: a,b=b,a%b return a
How to demonstrate that if GCD(b,c)=1, then GCD(a,b*c) = GCD(a,b).GCD(a,c)?
Using prime factor decomposition
$$ b = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_n^{a_n} $$
$$ c = q_1^{b_1} \times q_2^{b_2} \times \cdots \times q_m^{b_m} $$
As GCD(b,c)=1, no factor $ p $ is equal to any factor $ q $. However $ GCD(a,b) $ is a product of factors $ p $ and $ GCD(a,c) $ is a product of factors $ q $ and $ GCD(a, b \times c) $ is a product of factors $ p $ and $ q $. So $ GCD(a, b \times c) = GCD(a,b) \times GCD(a,c) $
How to calculate GCD with a calculator (TI or Casio)?
Calculators has generally a function for GCD, else here are programs
For Casio// GCD Finder"A=" : ? -> R"B=" : ? -> YI -> U : 0 -> W : 0 -> V : I -> XWhile Y <> 0Int(R/Y) -> QU -> Z : W -> U : Z-Q*W -> WV -> Z : X -> V : Z-Q*X -> XR -> Z : Y -> R : Z-Q*Y -> YWhileEnd"U=" : U : "V=" : V"PGCD=" : R
for TI (82,83,84,89)Input "A=", RInput "B=", YI -> U : 0 -> W : 0 -> V : I -> XWhile Y <> 0Int(R/Y) -> QU -> Z : W -> U : Z-Q*W -> WV -> Z : X -> V : Z-Q*X -> XR -> Z : Y -> R : Z-Q*Y -> YEndDisp "U=", U, "V=3, VDisp "PGCD=", R
What is the difference between GCD and LCM?
The GCD is a common divisor (the greatest) of the 2 numbers, which is a smaller number having both numbers for multiples.
The LCM is a common multiple (the lowest) of the 2 numbers, which is a larger number having both numbers for divisors.
The CGD and the LCM are linked by the formula: $$ GCD(a, b) = \frac{ a \times b }{ LCM(a, b) } $$
❓ Ask a new questionSource code
dCode retains ownership of the "GCD (Greatest Common Divisor)" source code. Any algorithm for the "GCD (Greatest Common Divisor)" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "GCD (Greatest Common Divisor)" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "GCD (Greatest Common Divisor)" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app. Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.
Cite dCode
The content of the page "GCD (Greatest Common Divisor)" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).
Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).
To cite dCode.fr on another website, use the link: https://www.dcode.fr/gcd
In a scientific article or book, the recommended bibliographic citation is: GCD (Greatest Common Divisor) on dCode.fr [online website], retrieved on 2025-12-26, https://www.dcode.fr/gcd
Need Help ?
Please, check our dCode Discord community for help requests!NB: for encrypted messages, test our automatic cipher identifier!
Questions / Comments
Write a messageFeedback and suggestions are welcome so that dCode offers the best 'GCD (Greatest Common Divisor)' tool for free! Thank you!
- GCD of 2 or more numbers Calculator
- LCM Calculator
- List of Divisors
- What is the GCD? (Definition)
- How to calculate the GCD? (Algorithm)
- How to find the GCD with multiple numbers? (GCD of 3 numbers or more)
- Why calculate GCD of numerator and denominator?
- What is the definition of two relatively prime numbers?
- What is the différence between GCD and HCF?
- How to calculate GCD with negative integers?
- How to calculate GCD with subtractions?
- How to calculate GCD of 2 numbers knowing their product and their LCM Calculator?
- How to code a GCD algorithm?
- How to demonstrate that if GCD(b,c)=1, then GCD(a,b*c) = GCD(a,b).GCD(a,c)?
- How to calculate GCD with a calculator (TI or Casio)?
- What is the difference between GCD and LCM Calculator?
- LCM Calculator (Lowest Common Multiple)
- Divisors of a Number
- Prime Counting Function
- Euler's Totient
- Zeckendorf Representation
- Möbius Function
- Prime Numbers Search
- DCODE'S TOOLS LIST
- Paypal
- Patreon
- Cryptocurrencies
- Discord
- Contact
- About dCode
- dCode App
- Wikipedia
Từ khóa » Tính Gcd Online
-
GCD Calculator - Alcula, Online Calculators
-
GCD Calculator - Mathepower
-
Online Calculator: The Greatest Common Divisor
-
Polynomial Greatest Common Divisor (GCD) Calculator - Symbolab
-
Tìm ước Số Chung Lớn Nhất - Tiện ích Nhỏ
-
Tìm ƯCLN Online
-
GCD (Hàm GCD) - Microsoft Support
-
GCD Calculator
-
Máy Tính LCM - Máy Tính đa Năng Phổ Biến Nhất - RT
-
Tính Tổng Với GCD - LQDOJ: Le Quy Don Online Judge
-
Good Calculators: Online Calculators - Tax, Finance, HR ...
-
Tìm ước Chung Lớn Nhất, Bội Chung Nhỏ Nhất Bằng Máy Tính Casio Fx ...