Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

Greatest common divisor (gcd)

Greatest common divisor of whole numbers.

How to write it

gcd(a, b, ...)

a
A whole number. Takes a whole number.
b
A whole number. Takes a whole number.

Examples

  • gcd⁡(12,18)=6\displaystyle \gcd(12, 18) = 6
    gcd(12, 18)

    In the solver, gcd(12, 18) gives 6.

    Open in the solver
  • gcd⁡(12,18,24)=6\displaystyle \gcd(12, 18, 24) = 6
    gcd(12, 18, 24)

    In the solver, gcd(12, 18, 24) gives 6.

    Open in the solver
  • im

    Imaginary part of a complex number.

  • frac

    Fractional part of a number.

  • lcm

    Least common multiple of whole numbers.

  • floor

    Greatest whole number not above a number.

  • log

    Logarithm: natural with ln, or to any base with log.

  • factorial

    Factorial: n! is the product of the whole numbers from 1 to n.