Math

Greatest Common Divisor Calculator

Find the largest whole number that divides two numbers exactly, with no remainder.

—

The GCD result is the largest whole number that divides both of your numbers exactly, with no remainder.

Formula

The greatest common divisor is found by repeatedly replacing the larger number with the remainder of dividing it by the smaller one, until the remainder is zero.

How it works

Enter two whole numbers. The calculator uses the Euclidean method, repeatedly taking remainders until one reaches zero. The last non-zero remainder is the answer.

Worked example

For example, for the numbers 48 and 36, the greatest common divisor is 12, because 12 divides both 48 and 36 exactly and no larger whole number does.

FAQs

What does the Greatest Common Divisor do?
It takes the values you enter and works out the greatest common divisor for you, showing the result straight away.

What should I enter?
Enter ordinary numbers in the boxes above. If a value does not make sense for this calculation, the page will ask you to check it instead of showing a wrong answer.

Can I use the result for homework or everyday math?
Yes. It is a general-purpose math helper; for exam or professional work, still check the steps against your own working.

Related calculators

Absolute Value Calculator

Arithmetic Sequence Calculator

Circle Area Calculator

Fast results

Instant result, no sign-up.

Free to use

All tools are free.

Formula shown on the page

Each page shows the formula it uses, so you can check the result yourself.

Works on mobile

Built for phone browsers.

Start with a free calculator

Search, pick a calculator, and get an instant result. No sign-up, no download.

Browse categories Read the blog