Math & Trig
All versions
◉ 75 views
=GCD()
Returns the greatest common divisor of two or more integers. The greatest common divisor is the largest integer that divides both number1 and number2 without a remainder.
Applies To:
Excel for Microsoft 365Excel for Microsoft 365 for MacExcel 2024Excel 2024 for MacExcel 2021Excel 2021 for MacExcel 2019Excel 2016
=GCD(number1, [number2], ...)
Hover argument names in the table for details.
Output typeNumber
Popularity10 / 100
VolatileNo
Dynamic ArrayNo
Download sample .xlsx ▦ Try in Playground
Dedicated file for this function — safe & lightweight · sample data + live formulas
⬇ Download Sample Workbook
A dedicated .xlsx for =GCD() with Persian sample data & live formulas — open in Excel and practice.
- Sheet “Sample” — data table + formula in place
- Sheet “Guide” — syntax, arguments & tips from this page
- Instant & secure (token + rate limit)
Quiz this function
%d questions — syntax, example & errors — test yourself!
◧ Arguments
| Argument | Type | Required | Description |
|---|---|---|---|
number1 |
Number | Required | , number2, ... Number1 is required, subsequent numbers are optional. 1 to 255 values. If any value is not an integer, it is truncated. |
▣ Examples
Greatest common divisor of 5 and 2
=GCD(5, 2)
Result:
1
Greatest common divisor of 24 and 36
=GCD(24, 36)
Result:
12
Greatest common divisor of 7 and 1
=GCD(7, 1)
Result:
1
Greatest common divisor of 5 and 0
=GCD(5, 0)
Result:
5
§ Remarks
- If any argument is nonnumeric, GCD returns the #VALUE! error value.
- If any argument is less than zero, GCD returns the #NUM! error value.
- One divides any value evenly.
- A prime number has only itself and one as even divisors.
- If a parameter to GCD is >=2^53, GCD returns the #NUM! error value.
✦ Tips
- One divides any value evenly.
- A prime number has only itself and one as even divisors.
⚠ Common Errors
#VALUE!
If any argument is nonnumeric, GCD returns the #VALUE! error value.
Fix: همه آرگومانها را به صورت عدد وارد کنید و بررسی کنید سلولهای مرجع متن نباشند.
#NUM!
If any argument is less than zero, GCD returns the #NUM! error value. If a parameter to GCD is >=2^53, GCD returns the #NUM! error value.
Fix: Correct the input value
💬 Comments & Q&A 0 approved
🔒 Your comment will be published after review.Share your thoughts — visible after admin approval
No comments yet — be the first!