CalcuAll.
A quick calculation, right here.

CalcuAlltor.

FREE ONLINE SCIENTIFIC CALCULATOR

0
Ready when you are.
English

Mathematics

Greatest Common Divisor

Find the largest integer divisor shared by two integers.

Let’s calculate.

Usage estimate

Find the largest integer divisor shared by two integers.

Your result
—
Rounded to up to 2 decimal places.

EXPLORE THE FORMULA

Greatest Common Divisor

Mathematics · FORMULA GUIDE

Your current calculation

The values and displayed result follow the calculator as you edit it.

First positive integer
—
Second positive integer
—
Your result—
This panel uses the calculator’s displayed, rounded result.

The formula

gcd(a,b) = gcd(b, a mod b)

Find the largest integer divisor shared by two integers.

Variables and input conventions

a
First positive integer
b
Second positive integer

Understanding the calculation

Repeatedly replace (a,b) by (b,a mod b) until the remainder is zero. The last nonzero divisor is the GCD. For 84 and 30 it is 6.

Interpreting the result

This tool accepts positive integers only, up to 10¹⁵ each. It excludes zero and signed inputs even though broader GCD definitions can include them.

A worked example

The GCD of 48 and 18 is 6.

A fixed reference example; it does not change with your inputs.

Assumptions and valid inputs

Positive integers, each at most 10^15. Uses Euclid’s algorithm.

Numeric entries must be finite, at most 100 characters, and either zero or have magnitude from 10⁻¹⁰⁰ to 10¹⁰⁰. Lists accept up to 1,000 entries, separated by semicolons or new lines; commas may be decimal separators, not thousands separators. Geometric series sums, CV, standard error and z-scores additionally limit result magnitude to 10¹⁰⁰.

Rounding and numerical precision

Mathematics calculations use a private 640-significant-digit decimal context; factorials and selections use exact integer arithmetic before display. Other topics use their stated numeric methods. Choose 0–8 decimal places for display and copying. Trailing zeros are omitted; very small values may round to zero. Display rounding does not change the underlying calculation. Finite-precision arithmetic is not symbolic exact arithmetic.

Accuracy of input data

Extra displayed decimals do not improve input accuracy. Measurement uncertainty, product variability and uncertain chosen rates are separate from rounding. This tool does not propagate measurement uncertainty. Check that its stated assumptions describe your situation.

References and further study

NIST

NIST defines the integer operation or Euclidean algorithm. CalcuAll deliberately restricts its supported inputs to positive integers; broader mathematical conventions are not silently applied.

Related tools

Formula and worked example

gcd(a,b) = gcd(b, a mod b)

Reference example

The GCD of 48 and 18 is 6.

When this calculation applies

This tool accepts positive integers only, up to 10¹⁵ each. It excludes zero and signed inputs even though broader GCD definitions can include them.

Background reference: NIST. References explain the method or units; they do not certify this calculator.

Source scope: NIST defines the integer operation or Euclidean algorithm. CalcuAll deliberately restricts its supported inputs to positive integers; broader mathematical conventions are not silently applied.

For the derivation, input conventions and numerical limits, open .