Code tool

GCD Calculator

Enter two integers to find their greatest common divisor.

In-browser processingNo account requiredPrivacy details ↗

A QUICK WALKTHROUGH

How to use this tool

  1. Enter two integers.
  2. Choose Calculate.
  3. Read the GCD result.

Integer inputs

Accepts signed safe integers; zero is allowed when the other value is non-zero.

GOOD TO KNOW

Common questions

What is gcd(0, n)?

It is the absolute value of n.