Zero is refused. A negative input is allowed and the divisor is reported as a positive integer.
How to use
- Enter two non-zero whole numbers.
- Press Calculate. The two inputs are printed with the divisor.
- Reset restores 48 and 18.
Formula / how it works
The steps for 48 and 18. 48 divided by 18 leaves 12. 18 divided by 12 leaves 6. 12 divided by 6 leaves 0. The last non-zero remainder is 6. Swap the inputs and you still get 6. The result prints both numbers so the screenshot shows what was asked. The LCM calculator uses this divisor. The identity is |A × B| = GCD × LCM.
Forty-eight and 18 meet at 6. Twelve and 8 meet at 4. Euclid’s steps for 48 and 18 are remainder 12, then remainder 6, then remainder 0, so 6 is the divisor. You can do that on paper and use the page as the check. Zero is refused because every integer divides zero and the greatest one is not a useful classroom answer. Negatives are allowed and the divisor is reported positive, because a greatest common divisor is taken as a positive integer. The two numbers are printed back so a screenshot shows the inputs. Swap them and the divisor does not change. The algorithm does not care which one you typed first.
Write the remainders next to the result when you are learning the algorithm. For 48 and 18 the remainders are 12 and then 6. The page prints only the last one, which is the answer. The steps are yours to keep. For 12 and 8 the remainder is 4, then 0, so 4 is the answer. Negatives are folded to a positive divisor so −48 and 18 still give 6. If you need the signed version for a proof, take the positive value and attach the sign your proof requires. Zero is the case the page will not invent an answer for. Use a non-zero pair. Swapping the boxes is a good habit. The answer should not move.
Euclid’s algorithm replaces the larger number with the remainder of the larger divided by the smaller, and repeats until the remainder is zero. The last non-zero remainder is the greatest common divisor. For 48 and 18 the first remainder is 12, the next remainder is 6, and the next remainder is 0, so the divisor is 6. For 12 and 8 the first remainder is 4 and the next is 0, so the divisor is 4. You can write those steps beside the result. The page prints the divisor and the two inputs, not the intermediate remainders. Zero is refused because every integer divides zero and there is no greatest one in the sense a classroom wants. A negative input is allowed and the divisor is shown positive. Swap the two boxes and run again. The divisor must stay the same. If it changes, you misread a digit. The least common multiple page uses this same divisor. For 12 and 18 the divisor is 6 and the multiple is 36. You can move between the two pages with the same pair and check that the product of the inputs equals the product of the divisor and the multiple.
Keep the two worked pairs on a card: 48 with 18 gives 6, and 12 with 8 gives 4. If a new pair confuses you, return to one of those and confirm the remainder steps still end at the printed divisor.
Worked examples
48 and 18
Inputs: A: 48 | B: 18
Leave A as 48 and B as 18, then press Calculate. The GCD is 6.
Result: A: 48
B: 18
GCD: 6
Euclid’s algorithm replaces the larger by the remainder until the remainder is 0.
12 and 8
Inputs: A: 12 | B: 8
Set A to 12 and B to 8, then press Calculate. The GCD is 4.
Result: A: 12
B: 8
GCD: 4
Euclid’s algorithm replaces the larger by the remainder until the remainder is 0.
Use cases
- Checking Euclid by hand.
- A positive divisor from a negative input.
- The other half of an LCM identity.
- A screenshot that shows both inputs.
Tips & limitations
- Zero is refused.
- Order does not matter.
- The divisor is positive.
- You can replay the remainders on paper.
FAQ
Why is the GCD of 48 and 18 equal to 6?
The remainders are 12, then 6, then 0. The last non-zero remainder is 6.
Does order matter?
No. Swapping the two numbers does not change the divisor.
Why is zero refused?
Every integer divides zero, so a greatest one is not a useful answer here.
Can an input be negative?
Yes. The divisor is reported positive.
How does this relate to the LCM?
The product of the absolute values equals the GCD times the LCM.
Are the numbers uploaded?
No. The remainders are computed in the browser.
Results are calculated from the values you enter. Double-check measurements and allow a margin before buying materials or making decisions.